Mercurial > hg
comparison mcabber/src/commands.h @ 1607:14690e624e9d
Add modules
author | Myhailo Danylenko <isbear@ukrpost.net> |
---|---|
date | Sun, 11 Oct 2009 16:01:52 +0200 |
parents | a087125d8fc8 |
children | fca9a4c17432 |
comparison
equal
deleted
inserted
replaced
1606:d7f26538c24c | 1607:14690e624e9d |
---|---|
1 #ifndef __COMMANDS_H__ | 1 #ifndef __COMMANDS_H__ |
2 #define __COMMANDS_H__ 1 | 2 #define __COMMANDS_H__ 1 |
3 | 3 |
4 #include <glib.h> | 4 #include <glib.h> |
5 | |
6 #include "config.h" | |
5 | 7 |
6 // Command structure | 8 // Command structure |
7 typedef struct { | 9 typedef struct { |
8 char name[32]; | 10 char name[32]; |
9 const char *help; | 11 const char *help; |
10 guint completion_flags[2]; | 12 guint completion_flags[2]; |
11 void (*func)(char *); | 13 void (*func)(char *); |
14 #ifdef MODULES_ENABLE | |
15 gpointer userdata; | |
16 #endif | |
12 } cmd; | 17 } cmd; |
13 | 18 |
14 void cmd_init(void); | 19 void cmd_init(void); |
15 cmd *cmd_get(const char *command); | 20 cmd *cmd_get(const char *command); |
16 int process_line(const char *line); | 21 int process_line(const char *line); |
17 int process_command(const char *line, guint iscmd); | 22 int process_command(const char *line, guint iscmd); |
18 char *expandalias(const char *line); | 23 char *expandalias(const char *line); |
24 #ifdef MODULES_ENABLE | |
25 void cmd_deinit(void); | |
26 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); | |
28 #endif | |
19 | 29 |
20 extern char *mcabber_version(void); | 30 extern char *mcabber_version(void); |
21 extern void mcabber_set_terminate_ui(void); | 31 extern void mcabber_set_terminate_ui(void); |
22 | 32 |
23 void cmd_room_whois(gpointer bud, char *nick_locale, guint interactive); | 33 void cmd_room_whois(gpointer bud, char *nick_locale, guint interactive); |