summaryrefslogtreecommitdiff
path: root/src/irc/core
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2016-08-24 19:48:35 -0300
committerdequis <dx@dxzone.com.ar>2016-08-24 19:56:23 -0300
commit3429c1a0a0dd336505e068dcea2a15efbf5a3c57 (patch)
tree9f63430e0b945c8d261b3862c86ae25a943f1377 /src/irc/core
parent2b7f32633c07de9fc4b8751ac73cf3049976b007 (diff)
downloadirssi-3429c1a0a0dd336505e068dcea2a15efbf5a3c57.zip
Set the default STATUSMSG to @ instead of @+ if it's missing
This fixes two issues: - IRCNet doesn't have STATUSMSG, but it supports +channels, and including + in the default value meant processing those incorrectly - The "bahamut hack", for old servers that support but don't advertise STATUSMSG, didn't work since ischannel_func doesn't use the default. The choice of @ intentionally leaves out support for other STATUSMSG (for example, AzzurraNet's bahamut 1.4 fork seemed to support + and % in any order, contradicting the comment in the code). I think this is a decent tradeoff, given how those servers are uncommon and relying on +# or %# is even less common than @#. Fixes #531
Diffstat (limited to 'src/irc/core')
-rw-r--r--src/irc/core/irc-servers.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/irc/core/irc-servers.c b/src/irc/core/irc-servers.c
index feb7cee8..8148997b 100644
--- a/src/irc/core/irc-servers.c
+++ b/src/irc/core/irc-servers.c
@@ -89,8 +89,10 @@ static int ischannel_func(SERVER_REC *server, const char *data)
chantypes = "#&!+"; /* normal, local, secure, modeless */
statusmsg = g_hash_table_lookup(irc_server->isupport, "statusmsg");
- if (statusmsg != NULL)
- data += strspn(data, statusmsg);
+ if (statusmsg == NULL)
+ statusmsg = "@";
+
+ data += strspn(data, statusmsg);
/* strchr(3) considers the trailing NUL as part of the string, make sure
* we didn't advance too much. */