From 87d444e1a531ad65472ccecf5fedf83ad7dfb06e Mon Sep 17 00:00:00 2001 From: "psyc://psyced.org/~lynX" <@> Date: Thu, 5 Mar 2009 11:34:22 +0100 Subject: [PATCH] _source_hack becomes _INTERNAL_source_IRC --- CHANGESTODO | 10 +-- world/default/de/plain.textdb | 10 +-- world/default/en/irc.textdb | 124 +++++++++++++++++----------------- world/net/irc/gatebot.c | 4 +- world/net/irc/user.c | 61 +++++++++-------- 5 files changed, 107 insertions(+), 102 deletions(-) diff --git a/CHANGESTODO b/CHANGESTODO index 030cd4c..32e90b1 100644 --- a/CHANGESTODO +++ b/CHANGESTODO @@ -1812,8 +1812,8 @@ see also: http://about.psyc.eu/SPAM - "known bug:" die shout()-funktionen betreiben kein vars-cloning, daher ist sowas möglich (das sollte aber nicht schlimm sein): place/irc caught zero source ("_notice_broadcast_garbage","Test 1.",([ - "_source_hack": "c|h|a|o|s!c|h|a|o|s@ve.example.com", - "_nick_me": "lethe", + "_INTERNAL_source_IRC": "c|h|a|o|s!c|h|a|o|s@ve.example.com", + "_nick_me": "example", "_nick": "c|h|a|o|s", "_prefix": "" ])) @@ -2284,8 +2284,8 @@ net/* + room status uses sendmsg/msg and therefore also works remotely net/irc/user - ::msg() was getting skipped with all sorts of complications -+ replaced [_nick]![_ident]@[_host] by [_source_hack] -+ [_source_hack] contains psyc://uni with !*@* appended for remoteUNIs ++ replaced [_nick]![_ident]@[_host] by [_INTERNAL_source_IRC] ++ [_INTERNAL_source_IRC] contains psyc://uni with !*@* appended for remoteUNIs net/nntp + fippo's gone crazy and implementing nntp based on user subscriptions of blog rooms. wow. @@ -3385,7 +3385,7 @@ irc/user + comma-list JOIN ignored unless _flag_allow_IRC_list_comma is set - "TOPIC :" for deleting a topic is now supported - shut up on funny MODEs unless _flag_strict_IRC_mode is set -- minor mistake in _source_hack generation +- minor mistake in _INTERNAL_source_IRC generation - special copy+paste code to handle _list_members at entry discontinued - changed the text in RPL_ISUPPORT to literally what it says in the RFC. messages wheren't supposed to be used for detecting IRC semantics diff --git a/world/default/de/plain.textdb b/world/default/de/plain.textdb index cc5515d..33a6226 100644 --- a/world/default/de/plain.textdb +++ b/world/default/de/plain.textdb @@ -1723,10 +1723,10 @@ _warning_usage_auto |Syntax: /[_nick] _warning_usage_tell -|Syntax: /tell +|Syntax: /tell _warning_usage_notify -|Syntax: /notify [ i(mmediate),d(elayed),D(elayedMore) ] +|Syntax: /notify [ i(mmediate),d(elayed),D(elayedMore) ] _warning_usage_acquaintance |Syntax: /ignore oder /display @@ -1772,13 +1772,13 @@ _warning_usage_invite |Syntax: /invite _warning_usage_query -|Syntax: /talk und /talk zum Beenden des Zwiegesprächs. +|Syntax: /talk und /talk zum Beenden des Zwiegesprächs. _warning_usage_friend -|Syntax: /friend oder /unfriend +|Syntax: /friend oder /unfriend _warning_usage_authenticate -|Syntax: /auth(enticate) +|Syntax: /auth(enticate) _warning_usage_logging |Syntax: /logging (on|off) diff --git a/world/default/en/irc.textdb b/world/default/en/irc.textdb index efb08cd..e2f2b84 100644 --- a/world/default/en/irc.textdb +++ b/world/default/en/irc.textdb @@ -2,7 +2,7 @@ ## Check utf-8: Praise Atatürk! _status_AREYOUNUTS -|:[_source_hack] NOTICE [_nick_me] :[_data] +|:[_INTERNAL_source_IRC] NOTICE [_nick_me] :[_data] _MISC_character_command |+ @@ -14,28 +14,28 @@ _echo_invitation |#341 [_nick_me] [_nick_target] #[_nick_place] _echo_place_enter -|:[_source_hack] JOIN :#[_nick_place] +|:[_INTERNAL_source_IRC] JOIN :#[_nick_place] _echo_place_enter_automatic -|:[_source_hack] JOIN :#[_nick_place] +|:[_INTERNAL_source_IRC] JOIN :#[_nick_place] _echo_place_enter_subscribe -|:[_source_hack] JOIN :#[_nick_place] +|:[_INTERNAL_source_IRC] JOIN :#[_nick_place] _echo_place_enter_login -|:[_source_hack] JOIN :#[_nick_place] +|:[_INTERNAL_source_IRC] JOIN :#[_nick_place] _echo_place_enter_home -|:[_source_hack] JOIN :#[_nick_place] +|:[_INTERNAL_source_IRC] JOIN :#[_nick_place] _echo_place_enter_join -|:[_source_hack] JOIN :#[_nick_place] +|:[_INTERNAL_source_IRC] JOIN :#[_nick_place] _echo_place_enter_follow -|:[_source_hack] JOIN :#[_nick_place] +|:[_INTERNAL_source_IRC] JOIN :#[_nick_place] _echo_place_enter_automatic_subscription -|:[_source_hack] JOIN :#[_nick_place] +|:[_INTERNAL_source_IRC] JOIN :#[_nick_place] _info_commands |## gaim comes up with a useless popup instead of @@ -90,7 +90,7 @@ _list_places_end _echo_alias_added_NICEBUTCANTWORK |:[_alias] NICK {_VAR_server_uniform}~[_alias] |:{_VAR_server_uniform}~[_address] NICK [_address] -|## :[_source_hack] NOTICE :{_VAR_method} +|## :[_INTERNAL_source_IRC] NOTICE :{_VAR_method} |NOTICE :{_VAR_method} _echo_end_places @@ -112,13 +112,13 @@ _echo_start_places_entered |#321 Channel :Users Topic _request_legacy_CTCP -|:[_source_hack] PRIVMSG [_nick_me] :%[_type] [_value]% +|:[_INTERNAL_source_IRC] PRIVMSG [_nick_me] :%[_type] [_value]% _status_legacy_CTCP -|:[_source_hack] NOTICE [_nick_me] :%[_type] [_value]% +|:[_INTERNAL_source_IRC] NOTICE [_nick_me] :%[_type] [_value]% _request_version -|:[_source_hack] PRIVMSG [_nick_me] :%VERSION% +|:[_INTERNAL_source_IRC] PRIVMSG [_nick_me] :%VERSION% _error_unknown_name_user |#401 [_nick_me] [_nick_target] :{_error_unknown_name_user} @@ -141,65 +141,65 @@ _query_password |Please provide your password (Set it as the server password, or try /quote pass «your-password» or a syntax like /server {_VAR_server} «ircport» «your-password») _message_private -|:[_source_hack] PRIVMSG [_nick_me] :[_data] +|:[_INTERNAL_source_IRC] PRIVMSG [_nick_me] :[_data] _message_public -|:[_source_hack] PRIVMSG #[_nick_place] :[_data] +|:[_INTERNAL_source_IRC] PRIVMSG #[_nick_place] :[_data] _message_echo_private |## let's see how clients deal with messages to a remote target echoed back |## it will probably not look good, but the clients need to fix that really -|:[_source_hack] PRIVMSG [_nick_target] :[_data] +|:[_INTERNAL_source_IRC] PRIVMSG [_nick_target] :[_data] |## oh, ircII is pretty cool about this. it shows: |## -source:target- message _message_echo_private_NOT |## without this format, "You tell.. " is generated |## this is how BNC sends it instead: -|:[_source_hack] PRIVMSG [_nick_me] :<- <[_nick_me]> [_data] +|:[_INTERNAL_source_IRC] PRIVMSG [_nick_me] :<- <[_nick_me]> [_data] |## which is just like _message_private with an extra that isn't tamper-proof _message_echo_public -|:[_source_hack] PRIVMSG #[_nick_place] :[_data] +|:[_INTERNAL_source_IRC] PRIVMSG #[_nick_place] :[_data] _message_echo_public_action -|:[_source_hack] PRIVMSG #[_nick_place] :%ACTION [_prefix][_action].% +|:[_INTERNAL_source_IRC] PRIVMSG #[_nick_place] :%ACTION [_prefix][_action].% _message_echo_public_ask -|:[_source_hack] PRIVMSG #[_nick_place] :%ACTION [_prefix]{_TEXT_action_asks}: [_data]% +|:[_INTERNAL_source_IRC] PRIVMSG #[_nick_place] :%ACTION [_prefix]{_TEXT_action_asks}: [_data]% _message_echo_public_text_action -|:[_source_hack] PRIVMSG #[_nick_place] :%ACTION [_prefix][_action]: [_data]% +|:[_INTERNAL_source_IRC] PRIVMSG #[_nick_place] :%ACTION [_prefix][_action]: [_data]% _message_public_action -|:[_source_hack] PRIVMSG #[_nick_place] :%ACTION [_prefix][_action].% +|:[_INTERNAL_source_IRC] PRIVMSG #[_nick_place] :%ACTION [_prefix][_action].% _message_public_question -|:[_source_hack] PRIVMSG #[_nick_place] :%ACTION [_prefix]{_TEXT_action_asks}: [_data]% +|:[_INTERNAL_source_IRC] PRIVMSG #[_nick_place] :%ACTION [_prefix]{_TEXT_action_asks}: [_data]% _message_public_ask -|:[_source_hack] PRIVMSG #[_nick_place] :%ACTION [_prefix]{_TEXT_action_asks}: [_data]% +|:[_INTERNAL_source_IRC] PRIVMSG #[_nick_place] :%ACTION [_prefix]{_TEXT_action_asks}: [_data]% _message_public_text_action -|:[_source_hack] PRIVMSG #[_nick_place] :%ACTION [_prefix][_action]: [_data]% +|:[_INTERNAL_source_IRC] PRIVMSG #[_nick_place] :%ACTION [_prefix][_action]: [_data]% _message_private_annotate -|:[_source_hack] NOTICE [_nick_me] :[_data] +|:[_INTERNAL_source_IRC] NOTICE [_nick_me] :[_data] _message_private_action -|:[_source_hack] PRIVMSG [_nick_me] :%ACTION [_action].% +|:[_INTERNAL_source_IRC] PRIVMSG [_nick_me] :%ACTION [_action].% _message_private_question -|:[_source_hack] PRIVMSG [_nick_me] :%ACTION {_TEXT_action_asks}: [_data]% +|:[_INTERNAL_source_IRC] PRIVMSG [_nick_me] :%ACTION {_TEXT_action_asks}: [_data]% _message_private_ask -|:[_source_hack] PRIVMSG [_nick_me] :%ACTION {_TEXT_action_asks}: [_data]% +|:[_INTERNAL_source_IRC] PRIVMSG [_nick_me] :%ACTION {_TEXT_action_asks}: [_data]% _message_private_text_action -|:[_source_hack] PRIVMSG [_nick_me] :%ACTION [_action]: [_data]% +|:[_INTERNAL_source_IRC] PRIVMSG [_nick_me] :%ACTION [_action]: [_data]% _message_private_action_action -|:[_source_hack] PRIVMSG [_nick_me] :%ACTION [_action].% +|:[_INTERNAL_source_IRC] PRIVMSG [_nick_me] :%ACTION [_action].% _notice_switch_identity |:[_nick_me] NICK [_nick_next] @@ -208,53 +208,53 @@ _notice_login |## shut up _notice_invitation -|:[_source_hack] INVITE [_nick_me] :#[_nick_place] +|:[_INTERNAL_source_IRC] INVITE [_nick_me] :#[_nick_place] _notice_typing_inactive -|:[_source_hack] PRIVMSG [_nick_me] :%TYPING INACTIVE% +|:[_INTERNAL_source_IRC] PRIVMSG [_nick_me] :%TYPING INACTIVE% _notice_typing_paused -|:[_source_hack] PRIVMSG [_nick_me] :%TYPING PAUSED% +|:[_INTERNAL_source_IRC] PRIVMSG [_nick_me] :%TYPING PAUSED% _notice_typing_composing -|:[_source_hack] PRIVMSG [_nick_me] :%TYPING COMPOSING% +|:[_INTERNAL_source_IRC] PRIVMSG [_nick_me] :%TYPING COMPOSING% _notice_typing_active -|:[_source_hack] PRIVMSG [_nick_me] :%TYPING ACTIVE% +|:[_INTERNAL_source_IRC] PRIVMSG [_nick_me] :%TYPING ACTIVE% _notice_typing_gone -|:[_source_hack] PRIVMSG [_nick_me] :%TYPING GONE% +|:[_INTERNAL_source_IRC] PRIVMSG [_nick_me] :%TYPING GONE% _notice_place_AREYOUNUTS |:{_VAR_server} NOTICE #[_nick_place] :[_data] _notice_place_enter |## es wird nur diese JOIN datei verwendet.. die anderen können alle in den müll -|:[_source_hack] JOIN :#[_nick_place] +|:[_INTERNAL_source_IRC] JOIN :#[_nick_place] _notice_place_enter_automatic -|:[_source_hack] JOIN :#[_nick_place] +|:[_INTERNAL_source_IRC] JOIN :#[_nick_place] _notice_place_enter_subscribe -|:[_source_hack] JOIN :#[_nick_place] +|:[_INTERNAL_source_IRC] JOIN :#[_nick_place] _notice_place_enter_login -|:[_source_hack] JOIN :#[_nick_place] +|:[_INTERNAL_source_IRC] JOIN :#[_nick_place] _notice_place_enter_home -|:[_source_hack] JOIN :#[_nick_place] +|:[_INTERNAL_source_IRC] JOIN :#[_nick_place] _notice_place_enter_join -|:[_source_hack] JOIN :#[_nick_place] +|:[_INTERNAL_source_IRC] JOIN :#[_nick_place] _notice_place_enter_follow -|:[_source_hack] JOIN :#[_nick_place] +|:[_INTERNAL_source_IRC] JOIN :#[_nick_place] _notice_place_enter_automatic_subscription -|:[_source_hack] JOIN :#[_nick_place] +|:[_INTERNAL_source_IRC] JOIN :#[_nick_place] _echo_place_leave -|:[_source_hack] PART #[_nick_place] :{_VAR_method} +|:[_INTERNAL_source_IRC] PART #[_nick_place] :{_VAR_method} _echo_place_leave_logout |## Why is this blank? Current w() code ignores this however. @@ -262,59 +262,59 @@ _echo_place_leave_logout _notice_place_leave |## user messages embedded in state changes are bad protocol design |## we use the space for system text -|:[_source_hack] PART #[_nick_place] :{_VAR_method} +|:[_INTERNAL_source_IRC] PART #[_nick_place] :{_VAR_method} _notice_place_leave_automatic -|:[_source_hack] PART #[_nick_place] :{_VAR_method} +|:[_INTERNAL_source_IRC] PART #[_nick_place] :{_VAR_method} _notice_place_leave_subscribe -|:[_source_hack] PART #[_nick_place] :{_VAR_method} +|:[_INTERNAL_source_IRC] PART #[_nick_place] :{_VAR_method} _notice_place_leave_netburp -|:[_source_hack] PART #[_nick_place] :{_VAR_method} +|:[_INTERNAL_source_IRC] PART #[_nick_place] :{_VAR_method} _notice_place_leave_home -|:[_source_hack] PART #[_nick_place] :{_VAR_method} +|:[_INTERNAL_source_IRC] PART #[_nick_place] :{_VAR_method} _notice_place_leave_disconnect -|:[_source_hack] PART #[_nick_place] :{_VAR_method} +|:[_INTERNAL_source_IRC] PART #[_nick_place] :{_VAR_method} _notice_place_leave_netburp -|:[_source_hack] PART #[_nick_place] :{_VAR_method} +|:[_INTERNAL_source_IRC] PART #[_nick_place] :{_VAR_method} _notice_place_leave_follow -|:[_source_hack] PART #[_nick_place] :{_VAR_method} +|:[_INTERNAL_source_IRC] PART #[_nick_place] :{_VAR_method} _notice_place_leave_logout -|:[_source_hack] PART #[_nick_place] :{_VAR_method} +|:[_INTERNAL_source_IRC] PART #[_nick_place] :{_VAR_method} _notice_place_leave_automatic_subscription -|:[_source_hack] PART #[_nick_place] :{_VAR_method} +|:[_INTERNAL_source_IRC] PART #[_nick_place] :{_VAR_method} _notice_place_leave_invalid -|:[_source_hack] PART #[_nick_place] :{_VAR_method} +|:[_INTERNAL_source_IRC] PART #[_nick_place] :{_VAR_method} _notice_place_topic -|:[_source_hack] TOPIC #[_nick_place] :[_topic] +|:[_INTERNAL_source_IRC] TOPIC #[_nick_place] :[_topic] _notice_place_topic_official |#332 [_nick_me] #[_nick_place] :[_topic] _echo_ping -|:[_source_hack] NOTICE [_nick_me] :%PING [_time_ping]% +|:[_INTERNAL_source_IRC] NOTICE [_nick_me] :%PING [_time_ping]% _failure_unsupported_ping |## yes, this is a pong also... -|:[_source_hack] NOTICE [_nick_me] :%PING [_time_ping]% +|:[_INTERNAL_source_IRC] NOTICE [_nick_me] :%PING [_time_ping]% _info_server_version |:[_host_server] 351 [_nick_me] [_version].[_degree_debug] [_host_server] :[_version_server] using [_version_driver] available from [_page_server_software] _status_version -|:[_source_hack] NOTICE [_nick_me] :%VERSION [_version_description] ([_version])% +|:[_INTERNAL_source_IRC] NOTICE [_nick_me] :%VERSION [_version_description] ([_version])% _status_version_agent -|:[_source_hack] NOTICE [_nick_me] :%VERSION [_version_description] ([_version])% +|:[_INTERNAL_source_IRC] NOTICE [_nick_me] :%VERSION [_version_description] ([_version])% _list_friends_channel |#353 [_nick_me] = & :[_friends] diff --git a/world/net/irc/gatebot.c b/world/net/irc/gatebot.c index 487dfef..b86b713 100644 --- a/world/net/irc/gatebot.c +++ b/world/net/irc/gatebot.c @@ -330,7 +330,7 @@ case "privmsg": // joe_nick +" :You're not registered yet.\n"; render("_error_necessary_registration", "Sorry, you cannot use this without prior registration.", ([ - "_source_hack": IRCGATE_NICK, + "_INTERNAL_source_IRC": IRCGATE_NICK, "_nick_me" : joe_nick, ])); return 1; @@ -821,7 +821,7 @@ msg(source, mc, data, mapping vars, showingLog, target) { } #else // TODO: remove 'pm' logic? - vars["_source_hack"] = source; + vars["_INTERNAL_source_IRC"] = source; vars["_nick_me"] = ni; //send(source, psyctext(t, vars, data, source)); render(mca, data, vars, source); diff --git a/world/net/irc/user.c b/world/net/irc/user.c index 341e3e5..0ba0979 100644 --- a/world/net/irc/user.c +++ b/world/net/irc/user.c @@ -241,7 +241,7 @@ w(string mc, string data, mapping vars, mixed source) { // der raum uns ne kopie gibt.. ist auch gut so, denn der irc code // versaut total die history der räume! einmal ein ircer // drin gehabt und aus vars["_time_place"] sind _prefix'e geworden - // und _source_hack's sind im raum gespeichert und mehr so unsinn. + // und _INTERNAL_source_IRC's sind im raum gespeichert und mehr so unsinn. if (mappingp(vars)) vars = copy(vars); else vars = ([]); // hmm.. wie die _time_place's aus der room history rausfallen @@ -302,7 +302,8 @@ w(string mc, string data, mapping vars, mixed source) { return ::wAction(mc, data, vars + ([ "_action" : T("_TEXT_action_says", 0) ]), source, "", vars["_nick"]); -#ifdef OLD_LOCAL_NICK_PLAIN_TEXTDB_HACK //{{{ +#if 1 //def USE_THE_NICK +# ifdef OLD_LOCAL_NICK_PLAIN_TEXTDB_HACK //{{{ else if (vars["_nick_local"]) { // less work if (mc == "_message_echo_public_action" && (t = vars["_INTERNAL_nick_plain"])) { @@ -318,11 +319,12 @@ w(string mc, string data, mapping vars, mixed source) { sTextPath(0, v("language"), v("scheme")); } } -#else //}}} +# else //}}} else if (vars["_nick_local"] && vars["_nick_local"] == vars["_nick"]) vars["_nick"] = vars["_INTERNAL_nick_plain"] || vars["_nick_verbatim"]; -#endif +# endif +#endif // USE_THE_NICK // if (vars["_nick_local"]) mc += "_masquerade"; // more work di = printStyle(mc); // display infos @@ -372,32 +374,32 @@ w(string mc, string data, mapping vars, mixed source) { #ifdef GHOST //{{{ // in S2S mode we are not supposed to deliver nick!user@host // thus we use plain nicks or plain uniforms - vars["_source_hack"] = vars["_INTERNAL_nick_plain"] || vars["_nick"]; + vars["_INTERNAL_source_IRC"] = vars["_INTERNAL_nick_plain"] || vars["_nick"]; #else //}}} # if 0 // OLD // according to elmex "should never happen" happened... if (vars["_nick"]) { - vars["_source_hack"] = + vars["_INTERNAL_source_IRC"] = (vars["_INTERNAL_nick_plain"] || vars["_nick"]) + "!"+ (vars["_nick_long"] || vars["_INTERNAL_nick_plain"] || vars["_nick"]) +"@" SERVER_HOST; } else // should never happen - vars["_source_hack"] = to_string(source); + vars["_INTERNAL_source_IRC"] = to_string(source); # else // EXPERIMENTAL nick2 = vars["_INTERNAL_nick_plain"] || vars["_nick"]; - vars["_source_hack"] = nick2 ? nick2 + vars["_INTERNAL_source_IRC"] = nick2 ? nick2 +"!"+ (vars["_nick_long"] || vars["_INTERNAL_nick_plain"] || vars["_nick"]) +"@" SERVER_HOST : to_string(source); // should never happen # endif } else if (abbrev("_echo_place_enter", mc)) { - vars["_source_hack"] = MYNICK + "!" + MYNICK + "@" SERVER_HOST; + vars["_INTERNAL_source_IRC"] = MYNICK + "!" + MYNICK + "@" SERVER_HOST; #endif } else { #ifdef GHOST //{{{ // in S2S mode we are not supposed to deliver nick!user@host // thus we use plain nicks or plain uniforms - vars["_source_hack"] = source; + vars["_INTERNAL_source_IRC"] = source; #else //}}} u = parse_uniform(source); unless (u) { @@ -412,7 +414,7 @@ w(string mc, string data, mapping vars, mixed source) { # ifdef ALIASES if (raliases[source]) { nick2 = raliases[source]; - vars["_source_hack"] = nick2 +"!"+ + vars["_INTERNAL_source_IRC"] = nick2 +"!"+ u[UNick]? u[UNick] +"@"+ u[UHost] : (vars["_nick_long"] || vars["_INTERNAL_nick_plain"] @@ -422,22 +424,25 @@ w(string mc, string data, mapping vars, mixed source) { unless (nick2) { # endif + // should all of this go into our own copy of uni2nick() ? + // or should we keep protocol source hacks separate from + // people nicks in message templates? switch (u[UScheme]) { case "psyc": if (u[UUser] || (u[UResource] && strlen(u[UResource]) && u[UResource][0] == '~')) { string tmp = u[UNick]; - vars["_source_hack"] = u[UScheme] + "://" + vars["_INTERNAL_source_IRC"] = u[UScheme] + "://" + u[UHostPort] +"/~"+ tmp +"!"+ tmp +"@" + u[UHostPort]; - P4(("w:psyc _source_hack %O\n", vars["_source_hack"])) + P4(("w:psyc _INTERNAL_source_IRC %O\n", vars["_INTERNAL_source_IRC"])) } else { - vars["_source_hack"] = uniform2irc(source) + vars["_INTERNAL_source_IRC"] = uniform2irc(source) +"!*@"+ (u[UHostPort] || "host.undefined"); // '*' nicer than 'undefined' and never a nick // this happens a lot more often then we thought :( // like for _request_version from server_unl - D1( unless(u[UHostPort]) PP(("irc/user %O source %O results in %O for %O\n", ME, source, vars["_source_hack"], mc)); ) + D1( unless(u[UHostPort]) PP(("irc/user %O source %O results in %O for %O\n", ME, source, vars["_INTERNAL_source_IRC"], mc)); ) } break; case "jabber": @@ -453,22 +458,22 @@ w(string mc, string data, mapping vars, mixed source) { P3(("changing source from %O to %O\n", source, vars["_location"])) source = vars["_location"]; } - vars["_source_hack"] = uniform2irc(source) + vars["_INTERNAL_source_IRC"] = uniform2irc(source) + "!" + u[UUserAtHost]; #ifdef JABBER_PATH // MUC support.. // unfortunately, net/entity has rendered _nick unusable if (vars["_nick_place"] && vars["_INTERNAL_source_resource"] && member(vars["_INTERNAL_source_resource"], ' ') != -1){ // xmpp: is here in cleartext.. TODO maybe? - vars["_source_hack"] = "xmpp:"+ + vars["_INTERNAL_source_IRC"] = "xmpp:"+ uniform2irc(u[UUserAtHost]); t = replace(vars["_INTERNAL_source_resource"], " ", "%20"); - vars["_source_hack"] += "/" + t + "!" + u[UUserAtHost]; - PT(("irc/user: XMPP source hack %O for %O\n", vars["_source_hack"], ME)) + vars["_INTERNAL_source_IRC"] += "/" + t + "!" + u[UUserAtHost]; + PT(("irc/user: XMPP source hack %O for %O\n", vars["_INTERNAL_source_IRC"], ME)) } #endif break; default: - vars["_source_hack"] = source + "!*@*"; + vars["_INTERNAL_source_IRC"] = source + "!*@*"; } # ifdef ALIASES } @@ -482,7 +487,7 @@ w(string mc, string data, mapping vars, mixed source) { int l; string output; - output =":"+ vars["_source_hack"] +" NOTICE "+ MYNICK +" :"; + output =":"+ vars["_INTERNAL_source_IRC"] +" NOTICE "+ MYNICK +" :"; l = strlen(output); output += "#PRESENCE "+ t +" "+ vars["_degree_mood"] +" :"+ vars["_description_presence"] +"#\n"; @@ -497,20 +502,20 @@ w(string mc, string data, mapping vars, mixed source) { if (old <= AVAILABILITY_VACATION) { if (t >= AVAILABILITY_NEARBY) - emit(":"+ vars["_source_hack"] +" JOIN :&HERE\n"); + emit(":"+ vars["_INTERNAL_source_IRC"] +" JOIN :&HERE\n"); else if (t >= AVAILABILITY_AWAY) - emit(":"+ vars["_source_hack"] +" JOIN :&AWAY\n"); + emit(":"+ vars["_INTERNAL_source_IRC"] +" JOIN :&AWAY\n"); } else if (old < AVAILABILITY_NEARBY) { if (t >= AVAILABILITY_NEARBY) { - emit(":"+ vars["_source_hack"] +" PART :&AWAY\n"); - emit(":"+ vars["_source_hack"] +" JOIN :&HERE\n"); + emit(":"+ vars["_INTERNAL_source_IRC"] +" PART :&AWAY\n"); + emit(":"+ vars["_INTERNAL_source_IRC"] +" JOIN :&HERE\n"); } else if (t < AVAILABILITY_AWAY) - emit(":"+ vars["_source_hack"] +" PART :&AWAY\n"); + emit(":"+ vars["_INTERNAL_source_IRC"] +" PART :&AWAY\n"); } else { if (t < AVAILABILITY_NEARBY) - emit(":"+ vars["_source_hack"] +" PART :&HERE\n"); + emit(":"+ vars["_INTERNAL_source_IRC"] +" PART :&HERE\n"); if (t >= AVAILABILITY_AWAY) - emit(":"+ vars["_source_hack"] +" JOIN :&AWAY\n"); + emit(":"+ vars["_INTERNAL_source_IRC"] +" JOIN :&AWAY\n"); } # else // ... MODE #whateverTesting +v xni3