remove unused code, cleanup & shorten parse_message() function;
hide commands[] table; make it's contents accessible using a function
This commit is contained in:
1 parent
bf1c2688c2
commit
f9d35cad9e
3 files changed
+129
-280
No files matched your search
@@ -19,13 +19,14 @@
|
||||
point to a function to call, defined below.
|
||||
*/
|
||||
|
||||
typedef int (*CommandFunc) (Client * c, int argc, char **argv);
|
||||
|
||||
typedef struct client_function {
|
||||
char *keyword;
|
||||
int (*function) (Client * c, int argc, char **argv);
|
||||
CommandFunc function;
|
||||
} client_function;
|
||||
|
||||
/* FIXME? Do these really need to be visible from other sources?*/
|
||||
|
||||
extern client_function commands[];
|
||||
CommandFunc get_command_function(char *cmd);
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user