diff options
Diffstat (limited to 'src/common/modes.c')
-rw-r--r-- | src/common/modes.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/common/modes.c b/src/common/modes.c index 0486b532..dfcfdbc6 100644 --- a/src/common/modes.c +++ b/src/common/modes.c @@ -392,6 +392,8 @@ handle_single_mode (mode_run *mr, char sign, char mode, char *nick, session *sess; server *serv = mr->serv; char outbuf[4]; + char *cm = serv->chanmodes; + gboolean supportsq = FALSE; outbuf[0] = sign; outbuf[1] = 0; @@ -417,6 +419,17 @@ handle_single_mode (mode_run *mr, char sign, char mode, char *nick, record_chan_mode (sess, sign, mode, arg); } + /* Is q a chanmode on this server? */ + if (cm) + while (*cm) + { + if (*cm == ',') + break; + if (*cm == 'q') + supportsq = TRUE; + cm++; + } + switch (sign) { case '+': @@ -460,6 +473,12 @@ handle_single_mode (mode_run *mr, char sign, char mode, char *nick, if (!quiet) EMIT_SIGNAL (XP_TE_CHANINVITE, sess, nick, arg, NULL, NULL, 0); return; + case 'q': + if (!supportsq) + break; /* +q is owner on this server */ + if (!quiet) + EMIT_SIGNAL (XP_TE_CHANQUIET, sess, nick, arg, NULL, NULL, 0); + return; } break; case '-': @@ -503,6 +522,12 @@ handle_single_mode (mode_run *mr, char sign, char mode, char *nick, if (!quiet) EMIT_SIGNAL (XP_TE_CHANRMINVITE, sess, nick, arg, NULL, NULL, 0); return; + case 'q': + if (!supportsq) + break; /* -q is owner on this server */ + if (!quiet) + EMIT_SIGNAL (XP_TE_CHANUNQUIET, sess, nick, arg, NULL, NULL, 0); + return; } } |