mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
/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
This commit is contained in:
parent
655e111007
commit
67a9ad0598
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user