Idź do dokumentacji tego pliku.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __EKG_COMMANDS_H
00022 #define __EKG_COMMANDS_H
00023
00024 #include "plugins.h"
00025 #include "themes.h"
00026 #include "sessions.h"
00027
00028 #define printq(x...) do { if (!quiet) { print(x); } } while(0)
00029
00030 #define COMMAND(x) int x(const char *name, const char **params, session_t *session, const char *target, int quiet)
00031
00032 typedef COMMAND(command_func_t);
00033
00034 #define COMMAND_REMOTE 0x01
00035
00036 typedef struct command {
00037 struct command *next;
00038
00039
00040 char *name;
00041 plugin_t *__plugin;
00042
00043
00044 char **params;
00045 command_func_t *__function;
00046 int flags;
00047 char **possibilities;
00048 } command_t;
00049
00050 extern command_t *commands;
00051
00052 command_t *command_add(plugin_t *plugin, const char *name, char *params, command_func_t function, int flags, char *possibilities);
00053 command_t *remote_command_add(const char *name, char *params);
00054
00055 void command_init();
00056 command_t *commands_removei(command_t *c);
00057 void commands_destroy();
00058 int command_exec(const char *target, session_t *session, const char *line, int quiet);
00059 int command_exec_format(const char *target, session_t *session, int quiet, const char *format, ...);
00060
00061
00062
00063 #define SEND_NICKS_MAX 100
00064
00065 extern char *send_nicks[SEND_NICKS_MAX];
00066 extern int send_nicks_count, send_nicks_index;
00067
00068 void tabnick_add(const char *nick);
00069 void tabnick_remove(const char *nick);
00070
00071 int binding_help(int a, int b);
00072 int binding_quick_list(int a, int b);
00073
00074 int match_arg(const char *arg, char shortopt, const char *longopt, int longoptlen);
00075
00076 #endif
00077
00078
00079
00080
00081
00082
00083
00084
00085