mirror of
git://git.psyced.org/git/psyced
synced 2024-08-15 03:25:10 +00:00
bug in login greeting logic
This commit is contained in:
parent
13b4af8098
commit
36ade907c4
5 changed files with 53 additions and 46 deletions
|
@ -189,7 +189,7 @@ circuit(ho, po, transport, srv, whoami, sysQ, uniform) {
|
|||
#else
|
||||
unless(whoami) whoami = ho || ME;
|
||||
#endif
|
||||
qInit(me = whoami, 123, 12);
|
||||
qInit(me = whoami, 3303, 12);
|
||||
D1( if (q[me]) PP(("%O using %O's queue: %O\n", ME, me, sizeof(q[me]) > 2 ? sizeof(q[me]) : q[me])); )
|
||||
waitforme = CONNECT_RETRY;
|
||||
retry = 0;
|
||||
|
|
|
@ -1198,30 +1198,31 @@ static privmsg(args, text, req) {
|
|||
text = text[..<2];
|
||||
}
|
||||
#endif
|
||||
if (index(args, ',') > 0) {
|
||||
if (args) {
|
||||
if (index(args, ',') > 0) {
|
||||
w("_failure_unsupported_targets_multiple",
|
||||
"We do not allow sending to several recipients at once. Why did your client ignore our MAXTARGETS=1 directive?");
|
||||
return 0;
|
||||
}
|
||||
if (room = channel2place(args)) {
|
||||
if (!place || !v("place") || stricmp(room, v("place"))) {
|
||||
if (t = find_place(room)) {
|
||||
place = t;
|
||||
// this makes positive use of the psyc notion
|
||||
// of a "current" room even if irc doesn't support
|
||||
// that protocolwise..
|
||||
vSet("place", room);
|
||||
} else { // should the caller print this on privmsg() == 0?
|
||||
w("_error_illegal_name_place", "Room name contains illegal "
|
||||
"characters."); // uh. might be a lie
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (lower_case(args) == "nickserv") return parsecmd(text);
|
||||
person = args;
|
||||
if (room = channel2place(args)) {
|
||||
if (!place || !v("place") || stricmp(room, v("place"))) {
|
||||
if (t = find_place(room)) {
|
||||
place = t;
|
||||
// this makes positive use of the psyc notion
|
||||
// of a "current" room even if irc doesn't support
|
||||
// that protocolwise..
|
||||
vSet("place", room);
|
||||
} else { // should the caller print this on privmsg() == 0?
|
||||
w("_error_illegal_name_place", "Room name contains illegal "
|
||||
"characters."); // uh. might be a lie
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (lower_case(args) == "nickserv") return parsecmd(text);
|
||||
person = args;
|
||||
}
|
||||
}
|
||||
|
||||
unless (text = decode(text, person, req)) return;
|
||||
|
||||
// unless (args) speak(text);
|
||||
|
|
|
@ -683,6 +683,7 @@ PSYC _color
|
|||
#PSYC _degree_mood
|
||||
PSYC _description_private
|
||||
PSYC _description_presence
|
||||
# erm.. _flag here?
|
||||
PSYC _select_filter_presence
|
||||
PSYC _flag_action_speak_visible
|
||||
PSYC _flag_colors_ignore
|
||||
|
|
|
@ -1555,6 +1555,7 @@ logon() {
|
|||
// makeToken() isn't a good idea here, apparently
|
||||
sTextPath(v("layout"), v("language"), t);
|
||||
// cannot if (greeting) this since jabber:iq:auth depends on this
|
||||
// also greeting will only be defined after ::logon()
|
||||
// (use another w() maybe?)
|
||||
w("_notice_login", 0, ([ "_nick": MYNICK,
|
||||
"_page_network": "http://www.psyc.eu/",
|
||||
|
@ -1567,15 +1568,6 @@ logon() {
|
|||
autojoin();
|
||||
cmdchar = (v("commandcharacter") ||
|
||||
T("_MISC_character_command", "/"))[0..0];
|
||||
#ifndef _flag_disable_info_session
|
||||
if (greeting) {
|
||||
w("_warning_usage_set_language",
|
||||
"Mittels \"/set language de\" kann zur deutschen Sprache gewechselt werden.");
|
||||
if (cmdchar != "/") w("_warning_modified_command_character",
|
||||
"Beware, \"[_command_character]\" is configured as your command character.",
|
||||
([ "_command_character" : cmdchar ]) );
|
||||
}
|
||||
#endif
|
||||
cmdchar = cmdchar[0];
|
||||
|
||||
actchar = v("actioncharacter") || T("_MISC_character_action",":");
|
||||
|
@ -1597,6 +1589,17 @@ logon() {
|
|||
#endif
|
||||
::logon( query_ip_name(ME) ||
|
||||
(this_interactive() && query_ip_name(this_interactive())) );
|
||||
|
||||
#ifndef _flag_disable_info_session
|
||||
// greeting is only defined after ::logon has run
|
||||
if (greeting) {
|
||||
w("_warning_usage_set_language",
|
||||
"Mittels \"/set language de\" kann zur deutschen Sprache gewechselt werden.");
|
||||
if (cmdchar != "/") w("_warning_modified_command_character",
|
||||
"Beware, \"[_command_character]\" is configured as your command character.",
|
||||
([ "_command_character" : cmdchar ]) );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// net/jabber/user filters this call, so this is never executed for
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue