ekg2  GIT master
Definicje | Funkcje | Zmienne
Dokumentacja pliku commands.c
#include "ekg2-config.h"
#include <string.h>
#include <ctype.h>
#include "commands.h"
#include "debug.h"
#include "dynstuff.h"
#include "sessions.h"
#include "stuff.h"
#include "themes.h"
#include "userlist.h"
#include "windows.h"
#include "xmalloc.h"
#include "queries.h"
#include "dynstuff_inline.h"
Wykres zależności załączania dla commands.c:

Definicje

#define _XOPEN_SOURCE   600
 
#define __EXTENSIONS__
 
#define _BSD_SOURCE
 

Funkcje

static int command_add_compare (const command_t *data1, const command_t *data2)
 
static void list_command_free (command_t *data)
 
static void commands_add (command_t *new)
 
 __attribute__ ((visibility("hidden")))
 
int match_arg (const char *arg, char shortopt, const char *longopt, int longoptlen)
 
void tabnick_add (const char *nick)
 
void tabnick_remove (const char *nick)
 
static int cmd_forward_to_server (const char *name, const char **params, session_t *session, const char *target, int quiet)
 
static int cmd_real_quit (const char *name, const char **params, session_t *session, const char *target, int quiet)
 
static int cmd_quit (const char *name, const char **params, session_t *session, const char *target, int quiet)
 
static char * strip_spaces (char *line)
 
int command_exec (const char *target, session_t *session, const char *xline, int quiet)
 
int command_exec_format (const char *target, session_t *session, int quiet, const char *format,...)
 
int binding_help (int a, int b)
 
static const char * ekg_status_label (const int status)
 
int binding_quick_list (int a, int b)
 
static command_tcommand_find (const char *name)
 
static command_tcommand_add_c (plugin_t *plugin, const char *name, char *params, command_func_t function, int flags, char *possibilities)
 
command_tcommand_add (plugin_t *plugin, const char *name, char *params, command_func_t function, int flags, char *possibilities)
 

Zmienne

char * send_nicks [100] = { NULL }
 
int send_nicks_count = 0
 
int send_nicks_index = 0
 
static int quit_command = 0
 
command_tcommands = NULL
 

Dokumentacja definicji

◆ __EXTENSIONS__

#define __EXTENSIONS__

◆ _BSD_SOURCE

#define _BSD_SOURCE

◆ _XOPEN_SOURCE

#define _XOPEN_SOURCE   600

Dokumentacja funkcji

◆ __attribute__()

__attribute__ ( (visibility("hidden"))  )

◆ binding_help()

int binding_help ( int  a,
int  b 
)

◆ binding_quick_list()

int binding_quick_list ( int  a,
int  b 
)

◆ cmd_forward_to_server()

static int cmd_forward_to_server ( const char *  name,
const char **  params,
session_t session,
const char *  target,
int  quiet 
)
static

◆ cmd_quit()

static int cmd_quit ( const char *  name,
const char **  params,
session_t session,
const char *  target,
int  quiet 
)
static

◆ cmd_real_quit()

static int cmd_real_quit ( const char *  name,
const char **  params,
session_t session,
const char *  target,
int  quiet 
)
static

◆ command_add()

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

◆ command_add_c()

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

◆ command_add_compare()

static int command_add_compare ( const command_t data1,
const command_t data2 
)
static

◆ command_exec()

int command_exec ( const char *  target,
session_t session,
const char *  xline,
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_find()

static command_t* command_find ( const char *  name)
static

◆ commands_add()

static void commands_add ( command_t new)
static

◆ ekg_status_label()

static const char* ekg_status_label ( const int  status)
static

◆ list_command_free()

static void list_command_free ( command_t data)
static

◆ match_arg()

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

◆ strip_spaces()

static char* strip_spaces ( char *  line)
static

◆ tabnick_add()

void tabnick_add ( const char *  nick)

◆ tabnick_remove()

void tabnick_remove ( const char *  nick)

Dokumentacja zmiennych

◆ commands

command_t* commands = NULL

◆ quit_command

int quit_command = 0
static

◆ send_nicks

char* send_nicks[100] = { NULL }

◆ send_nicks_count

int send_nicks_count = 0

◆ send_nicks_index

int send_nicks_index = 0