|
ekg2
GIT master
|


Idź do kodu źródłowego tego pliku.
Struktury danych | |
| struct | command |
Definicje | |
| #define | printq(x...) do { if (!quiet) { print(x); } } while(0) |
| #define | COMMAND(x) int x(const char *name, const char **params, session_t *session, const char *target, int quiet) |
| #define | SEND_NICKS_MAX 100 |
Definicje typów | |
| typedef int | command_func_t(const char *name, const char **params, session_t *session, const char *target, int quiet) |
| typedef struct command | command_t |
Wyliczenia | |
| enum | command_flags_t { COMMAND_ISALIAS = 0x01, COMMAND_ISSCRIPT = 0x02, COMMAND_WITH_RESOURCE = 0x04, COMMAND_PASS_UNCHANGED = 0x08, COMMAND_ENABLEREQPARAMS = 0x10, COMMAND_PARAMASTARGET = 0x20, SESSION_MUSTBECONNECTED = 0x40, SESSION_MUSTBELONG = 0x80, SESSION_MUSTHAS = 0x100, SESSION_MUSTHASPRIVATE = 0x200, COMMAND_TARGET_VALID_UID = 0x400 } |
Funkcje | |
| command_t * | command_add (plugin_t *plugin, const char *name, char *params, command_func_t function, command_flags_t flags, char *possibilities) |
| int | command_remove (plugin_t *plugin, const char *name) |
| command_t * | command_find (const char *name) |
| void | command_init () |
| void | commands_remove (command_t *c) |
| void | commands_destroy () |
| int | command_exec (const char *target, session_t *session, const char *line, int quiet) |
| int | command_exec_params (const char *target, session_t *session, int quiet, const char *command,...) |
| int | command_exec_format (const char *target, session_t *session, int quiet, const char *format,...) |
| int | cmd_add (const char *name, const char **params, session_t *session, const char *target, int quiet) |
| int | cmd_alias_exec (const char *name, const char **params, session_t *session, const char *target, int quiet) |
| int | cmd_exec (const char *name, const char **params, session_t *session, const char *target, int quiet) |
| int | cmd_list (const char *name, const char **params, session_t *session, const char *target, int quiet) |
| int | cmd_dcc (const char *name, const char **params, session_t *session, const char *target, int quiet) |
| int | cmd_bind (const char *name, const char **params, session_t *session, const char *target, int quiet) |
| int | session_command (const char *name, const char **params, session_t *session, const char *target, int quiet) |
| int | cmd_on (const char *name, const char **params, session_t *session, const char *target, int quiet) |
| int | cmd_metacontact (const char *name, const char **params, session_t *session, const char *target, int quiet) |
| int | cmd_script (const char *name, const char **params, session_t *session, const char *target, int quiet) |
| void | tabnick_add (const char *nick) |
| void | tabnick_remove (const char *nick) |
| int | match_arg (const char *arg, char shortopt, const char *longopt, int longoptlen) |
Zmienne | |
| GSList * | commands |
| char * | send_nicks [100] |
| int | send_nicks_count |
| int | send_nicks_index |
| char * | last_search_first_name |
| char * | last_search_last_name |
| char * | last_search_nickname |
| char * | last_search_uid |
| #define COMMAND | ( | x | ) | int x(const char *name, const char **params, session_t *session, const char *target, int quiet) |
| #define printq | ( | x... | ) | do { if (!quiet) { print(x); } } while(0) |
| #define SEND_NICKS_MAX 100 |
| typedef int command_func_t(const char *name, const char **params, session_t *session, const char *target, int quiet) |
| enum command_flags_t |
| int cmd_add | ( | const char * | name, |
| const char ** | params, | ||
| session_t * | session, | ||
| const char * | target, | ||
| int | quiet | ||
| ) |
| int cmd_alias_exec | ( | const char * | name, |
| const char ** | params, | ||
| session_t * | session, | ||
| const char * | target, | ||
| int | quiet | ||
| ) |
| int cmd_bind | ( | const char * | name, |
| const char ** | params, | ||
| session_t * | session, | ||
| const char * | target, | ||
| int | quiet | ||
| ) |
| int cmd_dcc | ( | const char * | name, |
| const char ** | params, | ||
| session_t * | session, | ||
| const char * | target, | ||
| int | quiet | ||
| ) |
| int cmd_exec | ( | const char * | name, |
| const char ** | params, | ||
| session_t * | session, | ||
| const char * | target, | ||
| int | quiet | ||
| ) |
| int cmd_list | ( | const char * | name, |
| const char ** | params, | ||
| session_t * | session, | ||
| const char * | target, | ||
| int | quiet | ||
| ) |
| int cmd_metacontact | ( | const char * | name, |
| const char ** | params, | ||
| session_t * | session, | ||
| const char * | target, | ||
| int | quiet | ||
| ) |
| int cmd_on | ( | const char * | name, |
| const char ** | params, | ||
| session_t * | session, | ||
| const char * | target, | ||
| int | quiet | ||
| ) |
| int cmd_script | ( | const char * | name, |
| const char ** | params, | ||
| session_t * | session, | ||
| const char * | target, | ||
| int | quiet | ||
| ) |
| command_t* command_add | ( | plugin_t * | plugin, |
| const char * | name, | ||
| char * | params, | ||
| command_func_t | function, | ||
| command_flags_t | flags, | ||
| char * | possibilities | ||
| ) |
Add command, and make it known for ekg2.
| plugin | - plugin which handle this command |
| name | - name of command |
| params | - space seperated paramlist (read note for more details!) |
| function | - function handler |
| flags | - bitmask from commands.h (read note for more details!) |
| possibilities | - optional space separated list of possible params.. completion useful |
| int command_exec | ( | const char * | target, |
| session_t * | session, | ||
| const char * | line, | ||
| int | quiet | ||
| ) |
| int command_exec_format | ( | const char * | target, |
| session_t * | session, | ||
| int | quiet, | ||
| const char * | format, | ||
| ... | |||
| ) |
Format string in format and execute formated command Equivalent to:
char *tmp = saprintf(format, ...);
command_exec(target, session, tmp, quiet);
xfree(tmp);
| int command_exec_params | ( | const char * | target, |
| session_t * | session, | ||
| int | quiet, | ||
| const char * | command, | ||
| ... | |||
| ) |
| command_t* command_find | ( | const char * | name | ) |
| void command_init | ( | ) |
| int command_remove | ( | plugin_t * | plugin, |
| const char * | name | ||
| ) |
| void commands_destroy | ( | ) |
| void commands_remove | ( | command_t * | c | ) |
| int match_arg | ( | const char * | arg, |
| char | shortopt, | ||
| const char * | longopt, | ||
| int | longoptlen | ||
| ) |
| int session_command | ( | const char * | name, |
| const char ** | params, | ||
| session_t * | session, | ||
| const char * | target, | ||
| int | quiet | ||
| ) |
| void tabnick_add | ( | const char * | nick | ) |
| void tabnick_remove | ( | const char * | nick | ) |
| GSList* commands |
| char* last_search_first_name |
| char* last_search_last_name |
| char* last_search_nickname |
| char* last_search_uid |
| char* send_nicks[100] |
| int send_nicks_count |
| int send_nicks_index |
1.8.13