diff options
author | Timo Sirainen <cras@irssi.org> | 2001-11-03 13:31:33 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-11-03 13:31:33 +0000 |
commit | 67a9ad0598bcde5af151938859d61c76ee097b54 (patch) | |
tree | 8a9726b1e0b126a48afc3de2f23d755547f97692 /src/irc/core | |
parent | 655e1110071b38a55e07083c80c481a73810c49d (diff) | |
download | irssi-67a9ad0598bcde5af151938859d61c76ee097b54.zip |
/OP, /DEOP, /VOICE and /DEVOICE fixed not to print glib error if used in
non-channel window.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1963 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc/core')
-rw-r--r-- | src/irc/core/modes.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/irc/core/modes.c b/src/irc/core/modes.c index 25b212c2..910456ac 100644 --- a/src/irc/core/modes.c +++ b/src/irc/core/modes.c @@ -591,7 +591,9 @@ static void cmd_op(const char *data, IRC_SERVER_REC *server, { char *nicks; - CMD_IRC_SERVER(server); + CMD_IRC_SERVER(server); + if (!IS_IRC_CHANNEL(channel)) + cmd_return_error(CMDERR_NOT_JOINED); nicks = get_nicks(channel, data, 0, -1); if (nicks != NULL && *nicks != '\0') @@ -606,6 +608,8 @@ static void cmd_deop(const char *data, IRC_SERVER_REC *server, char *nicks; CMD_IRC_SERVER(server); + if (!IS_IRC_CHANNEL(channel)) + cmd_return_error(CMDERR_NOT_JOINED); nicks = get_nicks(channel, data, 1, -1); if (nicks != NULL && *nicks != '\0') @@ -620,6 +624,8 @@ static void cmd_voice(const char *data, IRC_SERVER_REC *server, char *nicks; CMD_IRC_SERVER(server); + if (!IS_IRC_CHANNEL(channel)) + cmd_return_error(CMDERR_NOT_JOINED); nicks = get_nicks(channel, data, 0, 0); if (nicks != NULL && *nicks != '\0') @@ -634,6 +640,8 @@ static void cmd_devoice(const char *data, IRC_SERVER_REC *server, char *nicks; CMD_IRC_SERVER(server); + if (!IS_IRC_CHANNEL(channel)) + cmd_return_error(CMDERR_NOT_JOINED); nicks = get_nicks(channel, data, -1, 1); if (nicks != NULL && *nicks != '\0') |