mirror of
https://github.com/weechat/weechat.git
synced 2026-06-28 22:06:38 +02:00
Added /rehash and /restart commands
This commit is contained in:
@@ -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)"),
|
||||
@@ -961,6 +967,34 @@ irc_cmd_send_quote (t_irc_server *server, char *arguments)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
@@ -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 **);
|
||||
|
||||
@@ -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)"),
|
||||
@@ -961,6 +967,34 @@ irc_cmd_send_quote (t_irc_server *server, char *arguments)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
@@ -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 **);
|
||||
|
||||
Reference in New Issue
Block a user