fippo forces me to commit this shit

This commit is contained in:
psyc://psyced.org/~lynX 2011-07-26 11:34:06 +02:00
parent f9b8f4261c
commit 1935907ce8
2 changed files with 7 additions and 3 deletions

View File

@ -481,16 +481,15 @@ open_stream(XMLNode node) {
string packet;
float version;
ASSERT("open_stream: node[@xmlns]", stringp(node["@xmlns"]), node)
// make a loooong random string and hash it not to expose our random numbers
streamid = sha1(RANDHEXSTRING + RANDHEXSTRING + RANDHEXSTRING + RANDHEXSTRING);
version = to_float(node["@version"]);
packet = sprintf("<?xml version='1.0' encoding='UTF-8' ?>"
"<stream:stream "
"xmlns='%s' "
"xmlns='jabber:server' "
"xmlns:db='jabber:server:dialback' "
"xmlns:stream='http://etherx.jabber.org/streams' "
"xml:lang='en' id='%s' ", node["@xmlns"], streamid);
"xml:lang='en' id='%s' ", streamid);
if (node["@to"]) {
packet += "from='" + node["@to"] + "' ";
} else {

View File

@ -1752,6 +1752,11 @@ cmd(a, args, b, source, vars) {
if (call_signature(source, "_request_"+a, args, vars, b)) return 1;
#endif
switch(a) {
case "mode": // irc legacy compatibility interface
// not implemented as "sig" since we don't need it
// for psyc clients
PT(("MODE(%O %O %O %O %O)\n", a, args, b, source, vars))
return 1;
#ifndef SIGS
#ifdef PLACE_MASQUERADE
case "nickname":