ekg2  GIT master
Struktury danych | Definicje | Definicje typów | Funkcje | Zmienne
Dokumentacja pliku commands.h
#include "plugins.h"
#include "themes.h"
#include "sessions.h"
Wykres zależności załączania dla commands.h:
Ten wykres pokazuje, które pliki bezpośrednio lub pośrednio załączają ten plik:

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_tcommand_add (plugin_t *plugin, const char *name, char *params, command_func_t function, int flags, char *possibilities)
 
command_tremote_command_add (const char *name, char *params)
 
void command_init ()
 
command_tcommands_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_tcommands
 
char * send_nicks [100]
 
int send_nicks_count
 
int send_nicks_index
 

Dokumentacja definicji

◆ COMMAND

#define COMMAND (   x)    int x(const char *name, const char **params, session_t *session, const char *target, int quiet)

◆ COMMAND_REMOTE

#define COMMAND_REMOTE   0x01

◆ printq

#define printq (   x...)    do { if (!quiet) { print(x); } } while(0)

◆ SEND_NICKS_MAX

#define SEND_NICKS_MAX   100

Dokumentacja definicji typów

◆ command_func_t

typedef int command_func_t(const char *name, const char **params, session_t *session, const char *target, int quiet)

◆ command_t

typedef struct command command_t

Dokumentacja funkcji

◆ binding_help()

int binding_help ( int  a,
int  b 
)

◆ binding_quick_list()

int binding_quick_list ( int  a,
int  b 
)

◆ command_add()

command_t* command_add ( plugin_t plugin,
const char *  name,
char *  params,
command_func_t  function,
int  flags,
char *  possibilities 
)

◆ command_exec()

int command_exec ( const char *  target,
session_t session,
const char *  line,
int  quiet 
)

◆ command_exec_format()

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.

◆ command_init()

void command_init ( )

◆ commands_destroy()

void commands_destroy ( )

◆ commands_removei()

command_t* commands_removei ( command_t c)

◆ match_arg()

int match_arg ( const char *  arg,
char  shortopt,
const char *  longopt,
int  longoptlen 
)

◆ remote_command_add()

command_t* remote_command_add ( const char *  name,
char *  params 
)

◆ tabnick_add()

void tabnick_add ( const char *  nick)

◆ tabnick_remove()

void tabnick_remove ( const char *  nick)

Dokumentacja zmiennych

◆ commands

command_t* commands

◆ send_nicks

char* send_nicks[100]

◆ send_nicks_count

int send_nicks_count

◆ send_nicks_index

int send_nicks_index