comparison mcabber/mcabber/commands.h @ 1939:932d1b250a55

Simplify cmd_add() (Myhailo Danylenko) Merge patch from isbear's mcabber-experimental repository.
author Mikael Berthe <mikael@lilotux.net>
date Sun, 27 Feb 2011 16:51:55 +0100
parents 26e437e79e60
children ad77110343d6
comparison
equal deleted inserted replaced
1938:26e437e79e60 1939:932d1b250a55
9 typedef struct { 9 typedef struct {
10 char name[32]; 10 char name[32];
11 const char *help; 11 const char *help;
12 guint completion_flags[2]; 12 guint completion_flags[2];
13 void (*func)(char *); 13 void (*func)(char *);
14 #ifdef MODULES_ENABLE
15 gpointer userdata; 14 gpointer userdata;
16 #endif
17 } cmd; 15 } cmd;
18 16
19 void cmd_init(void); 17 void cmd_init(void);
20 cmd *cmd_get(const char *command); 18 cmd *cmd_get(const char *command);
21 int process_line(const char *line); 19 int process_line(const char *line);
22 int process_command(const char *line, guint iscmd); 20 int process_command(const char *line, guint iscmd);
23 char *expandalias(const char *line); 21 char *expandalias(const char *line);
24 #ifdef MODULES_ENABLE 22 #ifdef MODULES_ENABLE
25 void cmd_deinit(void);
26 gpointer cmd_del(const char *name); 23 gpointer cmd_del(const char *name);
27 void cmd_add(const char *name, const char *help, guint flags1, guint flags2, void (*f)(char*), gpointer userdata); 24 void cmd_add(const char *name, const char *help, guint flags1, guint flags2, void (*f)(char*), gpointer userdata);
28 #endif 25 #endif
29 26
30 void cmd_room_whois(gpointer bud, const char *nick, guint interactive); 27 void cmd_room_whois(gpointer bud, const char *nick, guint interactive);