diff options
author | Timo Sirainen <cras@irssi.org> | 2002-08-22 20:35:43 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-08-22 20:35:43 +0000 |
commit | 0b12cfe47bf4207134b869a08c46af55bb56e202 (patch) | |
tree | 307e27eebe64948e1388c90b49e73a94542f0aaf | |
parent | 3303db4e87e08e430abb5bfa4b5bd574d2ca3396 (diff) | |
download | irssi-0b12cfe47bf4207134b869a08c46af55bb56e202.zip |
When checking for autojoin-on-invite channels, also check the short !channel
names.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2879 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r-- | src/irc/core/channel-events.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/irc/core/channel-events.c b/src/irc/core/channel-events.c index 526c17d9..92784c1a 100644 --- a/src/irc/core/channel-events.c +++ b/src/irc/core/channel-events.c @@ -330,7 +330,7 @@ static void event_kick(IRC_SERVER_REC *server, const char *data) static void event_invite(IRC_SERVER_REC *server, const char *data) { - char *params, *channel; + char *params, *channel, *shortchan; g_return_if_fail(data != NULL); @@ -341,6 +341,13 @@ static void event_invite(IRC_SERVER_REC *server, const char *data) CHANNEL_SETUP_REC *setup; setup = channel_setup_find(channel, server->connrec->chatnet); + if (setup == NULL && channel[0] == '!' && + strlen(channel) > 6) { + shortchan = g_strdup_printf("!%s", channel+6); + setup = channel_setup_find(shortchan, + server->connrec->chatnet); + g_free(shortchan); + } if (setup != NULL && setup->autojoin && settings_get_bool("join_auto_chans_on_invite")) server->channels_join(SERVER(server), channel, TRUE); } |