2
* Copyright (c) 2003-2009 by FlashCode <flashcode@flashtux.org>
3
* See README for License detail, AUTHORS for developers list.
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 3 of the License, or
8
* (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
20
#ifndef __WEECHAT_IRC_COMMAND_H
21
#define __WEECHAT_IRC_COMMAND_H 1
26
#define IRC_COMMAND_TOO_FEW_ARGUMENTS(__buffer, __command) \
27
weechat_printf (__buffer, \
28
_("%s%s: too few arguments for \"%s\" command"), \
29
weechat_prefix ("error"), IRC_PLUGIN_NAME, \
33
#define IRC_COMMAND_CHECK_SERVER(__command, __check_connection) \
36
weechat_printf (NULL, \
37
_("%s%s: command \"%s\" must be executed on " \
38
"irc buffer (server or channel)"), \
39
weechat_prefix ("error"), IRC_PLUGIN_NAME, \
41
return WEECHAT_RC_OK; \
43
if (__check_connection && !ptr_server->is_connected) \
45
weechat_printf (NULL, \
46
_("%s%s: command \"%s\" must be executed on " \
47
"connected irc server"), \
48
weechat_prefix ("error"), IRC_PLUGIN_NAME, \
50
return WEECHAT_RC_OK; \
53
extern void irc_command_away_server (struct t_irc_server *server,
54
const char *arguments,
55
int reset_unread_marker);
56
extern void irc_command_join_server (struct t_irc_server *server,
57
const char *arguments);
58
extern void irc_command_mode_server (struct t_irc_server *server,
59
struct t_irc_channel *channel,
60
const char *arguments);
61
extern void irc_command_part_channel (struct t_irc_server *server,
62
const char *channel_name,
63
const char *part_message);
64
extern void irc_command_quit_server (struct t_irc_server *server,
65
const char *arguments);
66
extern void irc_command_init ();
68
#endif /* irc-command.h */