~ubuntu-branches/ubuntu/hardy/irssi/hardy-updates

« back to all changes in this revision

Viewing changes to src/irc/core/irc-commands.h

  • Committer: Bazaar Package Importer
  • Author(s): David Pashley
  • Date: 2005-12-10 21:25:51 UTC
  • Revision ID: james.westby@ubuntu.com-20051210212551-5qwm108g7inyu2f2
Tags: upstream-0.8.10
ImportĀ upstreamĀ versionĀ 0.8.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef __IRC_COMMANDS_H
 
2
#define __IRC_COMMANDS_H
 
3
 
 
4
#include "commands.h"
 
5
 
 
6
#define command_bind_irc(cmd, section, signal) \
 
7
        command_bind_proto(cmd, IRC_PROTOCOL, section, signal)
 
8
#define command_bind_irc_first(cmd, section, signal) \
 
9
        command_bind_proto_first(cmd, IRC_PROTOCOL, section, signal)
 
10
#define command_bind_irc_last(cmd, section, signal) \
 
11
        command_bind_proto_last(cmd, IRC_PROTOCOL, section, signal)
 
12
 
 
13
/* Simply returns if server isn't for IRC protocol. Prints ERR_NOT_CONNECTED
 
14
   error if there's no server or server isn't connected yet */
 
15
#define CMD_IRC_SERVER(server) \
 
16
        G_STMT_START { \
 
17
          if (server != NULL && !IS_IRC_SERVER(server)) \
 
18
            return; \
 
19
          if (server == NULL || !(server)->connected) \
 
20
            cmd_return_error(CMDERR_NOT_CONNECTED); \
 
21
        } G_STMT_END
 
22
 
 
23
void irc_commands_init(void);
 
24
void irc_commands_deinit(void);
 
25
 
 
26
#endif