diff options
author | LemonBoy <LemonBoy@users.noreply.github.com> | 2016-09-04 12:11:02 +0200 |
---|---|---|
committer | ailin-nemui <ailin-nemui@users.noreply.github.com> | 2016-09-14 09:30:15 +0200 |
commit | 31c0a9d7e8368e8cfa10356bd9dbc1f9024d9c70 (patch) | |
tree | c2a594c46f6255191f30919d75bb40609035e081 /src | |
parent | 750e3249038409607b0a57d21e21612e546539ed (diff) | |
download | irssi-31c0a9d7e8368e8cfa10356bd9dbc1f9024d9c70.zip |
Merge pull request #533 from dequis/statusmess
Set the default STATUSMSG to @ instead of @+ if it's missing
Diffstat (limited to 'src')
-rw-r--r-- | src/fe-common/irc/fe-irc-channels.c | 9 | ||||
-rw-r--r-- | src/irc/core/irc-servers.c | 6 |
2 files changed, 7 insertions, 8 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) { diff --git a/src/irc/core/irc-servers.c b/src/irc/core/irc-servers.c index 1df95f70..f905a862 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. */ |