summaryrefslogtreecommitdiff
path: root/src/irc
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-01-04 18:01:51 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-01-04 18:01:51 +0000
commit596ef586b2fc0fa6760178faaccd5d70de5c6617 (patch)
treee36a3cad80dd527e41d7c4fe83d0bbd9334b6517 /src/irc
parentd844880515cca4f0f3984b3d9de71c0b168b647b (diff)
downloadirssi-596ef586b2fc0fa6760178faaccd5d70de5c6617.zip
Added keyboard_entry_redirect() function to keyboard.[ch] which sends
the signal "gui entry redirect" signal. Added possibility to keep the entry hidden. /OPER [<nick> [<password>]] - syntax changed. If password isn't given, it's asked. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1063 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc')
-rw-r--r--src/irc/core/irc-commands.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/irc/core/irc-commands.c b/src/irc/core/irc-commands.c
index 5dd0023e..1af55608 100644
--- a/src/irc/core/irc-commands.c
+++ b/src/irc/core/irc-commands.c
@@ -1000,7 +1000,7 @@ static void sig_channel_destroyed(IRC_CHANNEL_REC *channel)
}
}
-/* SYNTAX: OPER [<nick>] <password> */
+/* SYNTAX: OPER [<nick> [<password>]] */
static void cmd_oper(const char *data, IRC_SERVER_REC *server)
{
char *nick, *password;
@@ -1010,13 +1010,10 @@ static void cmd_oper(const char *data, IRC_SERVER_REC *server)
if (!IS_IRC_SERVER(server) || !server->connected)
cmd_return_error(CMDERR_NOT_CONNECTED);
+ /* asking for password is handled by fe-common */
if (!cmd_get_params(data, &free_arg, 2, &nick, &password))
return;
- if (*nick == '\0') cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS);
- if (*password == '\0') {
- password = nick;
- nick = server->nick;
- }
+ if (*password == '\0') cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS);
irc_send_cmdv(server, "OPER %s %s", nick, password);
cmd_params_free(free_arg);