summaryrefslogtreecommitdiff
path: root/src/fe-common/irc/fe-netjoin.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-05-11 17:42:05 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-05-11 17:42:05 +0000
commit0ec7e8ed58a0ac9179ce6acf6aebc00b8796c8b5 (patch)
treee3a36f3778f806cd4baec0e777b13504a7432e09 /src/fe-common/irc/fe-netjoin.c
parentf89d89b0e75db019e48299fa112ac4086bd216ef (diff)
downloadirssi-0ec7e8ed58a0ac9179ce6acf6aebc00b8796c8b5.zip
netjoins should display the @, + etc. before the nick again.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1488 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/irc/fe-netjoin.c')
-rw-r--r--src/fe-common/irc/fe-netjoin.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/fe-common/irc/fe-netjoin.c b/src/fe-common/irc/fe-netjoin.c
index f1ce1197..f0e8d93c 100644
--- a/src/fe-common/irc/fe-netjoin.c
+++ b/src/fe-common/irc/fe-netjoin.c
@@ -326,22 +326,13 @@ static int netjoin_set_nickmode(NETJOIN_REC *rec, const char *channel,
char mode)
{
GSList *pos;
- char *oldchannel;
pos = gslist_find_icase_string(rec->now_channels, channel);
if (pos == NULL)
return FALSE;
- oldchannel = pos->data;
- if (isnickflag(*oldchannel) && mode != '\0') {
- /* already set some mode, should we use old or new one? */
- if (mode == '+' || (mode == '%' && *oldchannel == '@'))
- return TRUE;
- }
-
g_free(pos->data);
- pos->data = mode == '\0' ? g_strdup(channel) :
- g_strdup_printf("%c%s", mode, channel);
+ pos->data = g_strdup_printf("%c%s", mode, channel);
return TRUE;
}
@@ -355,7 +346,7 @@ static void msg_mode(IRC_SERVER_REC *server, const char *channel,
{
NETJOIN_REC *rec;
char *params, *mode, *nicks;
- char **nicklist, **nick, type;
+ char **nicklist, **nick, type, modechr;
int show;
g_return_if_fail(data != NULL);
@@ -379,8 +370,9 @@ static void msg_mode(IRC_SERVER_REC *server, const char *channel,
if (*nick != NULL && isnickmode(*mode)) {
/* give/remove ops */
rec = netjoin_find(server, *nick);
- if (rec == NULL || !netjoin_set_nickmode(rec, channel,
- nickmodechar(type)))
+ modechr = nickmodechar(*mode);
+ if (rec == NULL || type != '+' || modechr == '\0' ||
+ !netjoin_set_nickmode(rec, channel, modechr))
show = TRUE;
nick++;
} else {