summaryrefslogtreecommitdiff
path: root/src/fe-common/irc/fe-irc-channels.c
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/fe-common/irc/fe-irc-channels.c
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/fe-common/irc/fe-irc-channels.c')
-rw-r--r--src/fe-common/irc/fe-irc-channels.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/fe-common/irc/fe-irc-channels.c b/src/fe-common/irc/fe-irc-channels.c
index a2737fc3..0ec30003 100644
--- a/src/fe-common/irc/fe-irc-channels.c
+++ b/src/fe-common/irc/fe-irc-channels.c
@@ -41,7 +41,7 @@ int fe_channel_is_opchannel(IRC_SERVER_REC *server, const char *target)
statusmsg = g_hash_table_lookup(server->isupport, "statusmsg");
if (statusmsg == NULL)
- statusmsg = "@+";
+ statusmsg = "@";
return strchr(statusmsg, *target) != NULL;
}
@@ -61,12 +61,9 @@ const char *fe_channel_skip_prefix(IRC_SERVER_REC *server, const char *target)
statusmsg = g_hash_table_lookup(server->isupport, "statusmsg");
/* Hack: for bahamut 1.4 which sends neither STATUSMSG nor
- * WALLCHOPS in 005, accept @#chan and @+#chan (but not +#chan) */
- if (statusmsg == NULL && *target != '@')
- return target;
-
+ * WALLCHOPS in 005 */
if (statusmsg == NULL)
- statusmsg = "@+";
+ statusmsg = "@";
/* Strip the leading statusmsg prefixes */
while (strchr(statusmsg, *target) != NULL) {