#include "plugins.h"
#include "themes.h"
#include "sessions.h"
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 | COMMAND_REMOTE 0x01 |
#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 |
Funkcje |
command_t * | command_add (plugin_t *plugin, const char *name, char *params, command_func_t function, int flags, char *possibilities) |
command_t * | remote_command_add (const char *name, char *params) |
void | command_init () |
command_t * | commands_removei (command_t *c) |
void | commands_destroy () |
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,...) |
void | tabnick_add (const char *nick) |
void | tabnick_remove (const char *nick) |
int | binding_help (int a, int b) |
int | binding_quick_list (int a, int b) |
int | match_arg (const char *arg, char shortopt, const char *longopt, int longoptlen) |
Zmienne |
command_t * | commands |
char * | send_nicks [SEND_NICKS_MAX] |
int | send_nicks_count |
int | send_nicks_index |
Dokumentacja definicji
#define COMMAND |
( |
|
x | ) |
int x(const char *name, const char **params, session_t *session, const char *target, int quiet) |
#define COMMAND_REMOTE 0x01 |
#define printq |
( |
|
x... | ) |
do { if (!quiet) { print(x); } } while(0) |
#define SEND_NICKS_MAX 100 |
Dokumentacja definicji typów
Dokumentacja funkcji
int binding_help |
( |
int |
a, |
|
|
int |
b |
|
) |
| |
int binding_quick_list |
( |
int |
a, |
|
|
int |
b |
|
) |
| |
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, |
|
|
|
... |
|
) |
| |
command_exec_format()
Format string in format and execute formated command Equivalent to:
char *tmp = saprintf(format, ...);
command_exec(target, session, tmp, quiet);
xfree(tmp);
- Nota:
- For more details about string formating functions read man 3 vsnprintf
- Zobacz również:
- command_exec() - If you want/can use non-formating function.. Watch for swaped params! (quiet with format)
- Zwraca:
- 0 - If format was NULL
-1 - If command was not found [It's result of command_exec()]
else it returns result of command handler.
void commands_destroy |
( |
| ) |
|
int match_arg |
( |
const char * |
arg, |
|
|
char |
shortopt, |
|
|
const char * |
longopt, |
|
|
int |
longoptlen |
|
) |
| |
command_t* remote_command_add |
( |
const char * |
name, |
|
|
char * |
params |
|
) |
| |
void tabnick_add |
( |
const char * |
nick | ) |
|
void tabnick_remove |
( |
const char * |
nick | ) |
|
Dokumentacja zmiennych