1 #ifndef SILC_COMMANDS_H
2 #define SILC_COMMANDS_H
4 #define command_bind_silc(cmd, section, signal) \
5 command_bind_proto(cmd, SILC_PROTOCOL, section, signal)
6 #define command_bind_silc_first(cmd, section, signal) \
7 command_bind_proto_first(cmd, SILC_PROTOCOL, section, signal)
8 #define command_bind_silc_last(cmd, section, signal) \
9 command_bind_proto_last(cmd, SILC_PROTOCOL, section, signal)
11 /* Simply returns if server isn't for SILC protocol. Prints ERR_NOT_CONNECTED
12 error if there's no server or server isn't connected yet */
13 #define CMD_SILC_SERVER(server) \
15 if (server != NULL && !IS_SILC_SERVER(server)) \
17 if (server == NULL || !(server)->connected) \
18 cmd_return_error(CMDERR_NOT_CONNECTED); \
21 /* Returning from command function with error */
22 #define cmd_return_error_value(a,v) \
24 signal_emit("error command", 1, GINT_TO_POINTER(a)); \