summaryrefslogtreecommitdiff
path: root/src/irc
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2003-10-04 12:15:58 +0000
committerSebastien Helleu <flashcode@flashtux.org>2003-10-04 12:15:58 +0000
commit65c146e9c6dfc050780bad978c582bb659e28396 (patch)
tree8845edc11c5bd065f1026e21a132f9e8324b03a0 /src/irc
parentd6454184e47125fda831a4b95a30008da05b815b (diff)
downloadweechat-65c146e9c6dfc050780bad978c582bb659e28396.zip
Added /rehash and /restart commands
Diffstat (limited to 'src/irc')
-rw-r--r--src/irc/irc-commands.c34
-rw-r--r--src/irc/irc.h2
2 files changed, 36 insertions, 0 deletions
diff --git a/src/irc/irc-commands.c b/src/irc/irc-commands.c
index f852adf44..00ef9c7b5 100644
--- a/src/irc/irc-commands.c
+++ b/src/irc/irc-commands.c
@@ -145,6 +145,12 @@ t_irc_command irc_commands[] =
N_("data"),
N_("data: raw data to send"),
1, MAX_ARGS, 1, NULL, irc_cmd_send_quote, NULL },
+ { "rehash", N_("tell the server to reload its config file"),
+ "", "",
+ 0, 0, 1, NULL, irc_cmd_send_rehash, NULL },
+ { "restart", N_("tell the server to restart itself"),
+ "", "",
+ 0, 0, 1, NULL, irc_cmd_send_restart, NULL },
{ "topic", N_("get/set channel topic"),
N_("[channel] [topic]"), N_("channel: channel name\ntopic: new topic for channel "
"(if topic is \"-delete\" then topic is deleted)"),
@@ -962,6 +968,34 @@ irc_cmd_send_quote (t_irc_server *server, char *arguments)
}
/*
+ * irc_cmd_send_rehash: tell the server to reload its config file
+ */
+
+int
+irc_cmd_send_rehash (t_irc_server *server, char *arguments)
+{
+ /* make gcc happy */
+ (void) arguments;
+
+ server_sendf (server, "REHASH\r\n");
+ return 0;
+}
+
+/*
+ * irc_cmd_send_restart: tell the server to restart itself
+ */
+
+int
+irc_cmd_send_restart (t_irc_server *server, char *arguments)
+{
+ /* make gcc happy */
+ (void) arguments;
+
+ server_sendf (server, "RESTART\r\n");
+ return 0;
+}
+
+/*
* irc_cmd_send_topic: get/set topic for a channel
*/
diff --git a/src/irc/irc.h b/src/irc/irc.h
index 4ec4d4d98..41591045f 100644
--- a/src/irc/irc.h
+++ b/src/irc/irc.h
@@ -210,6 +210,8 @@ extern int irc_cmd_send_ping (t_irc_server *, int, char **);
extern int irc_cmd_send_pong (t_irc_server *, int, char **);
extern int irc_cmd_send_quit (t_irc_server *, char *);
extern int irc_cmd_send_quote (t_irc_server *, char *);
+extern int irc_cmd_send_rehash (t_irc_server *, char *);
+extern int irc_cmd_send_restart (t_irc_server *, char *);
extern int irc_cmd_send_topic (t_irc_server *, char *);
extern int irc_cmd_send_version (t_irc_server *, char *);
extern int irc_cmd_send_voice (t_irc_server *, int, char **);