mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
"/MODE !channel" should send the full name to server
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2838 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
2013e4b004
commit
d1e55d91b7
@ -716,6 +716,7 @@ static void cmd_devoice(const char *data, IRC_SERVER_REC *server,
|
||||
static void cmd_mode(const char *data, IRC_SERVER_REC *server,
|
||||
IRC_CHANNEL_REC *channel)
|
||||
{
|
||||
IRC_CHANNEL_REC *chanrec;
|
||||
char *target, *mode;
|
||||
void *free_arg;
|
||||
|
||||
@ -738,9 +739,13 @@ static void cmd_mode(const char *data, IRC_SERVER_REC *server,
|
||||
}
|
||||
if (*target == '\0') cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS);
|
||||
|
||||
if (*mode == '\0')
|
||||
if (*mode == '\0') {
|
||||
chanrec = irc_channel_find(server, target);
|
||||
if (chanrec != NULL)
|
||||
target = chanrec->name;
|
||||
|
||||
irc_send_cmdv(server, "MODE %s", target);
|
||||
else if (ischannel(*target))
|
||||
} else if (ischannel(*target))
|
||||
channel_set_mode(server, target, mode);
|
||||
else {
|
||||
if (g_strcasecmp(target, server->nick) == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user