ekg2  GIT master
Struktury danych | Definicje | Funkcje | Zmienne
Dokumentacja pliku polchat.c
#include "ekg2.h"
#include <stdlib.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <netdb.h>
#include <sys/time.h>
#include <string.h>
#include <errno.h>
#include <ekg/net.h>
#include "polchat_handlers.inc"
Wykres zależności załączania dla polchat.c:

Struktury danych

struct  polchat_private_t
 

Definicje

#define DEFPARTMSG   "EKG2 bejbi! http://ekg2.org/"
 
#define DEFQUITMSG   "EKG2 - It's better than sex!"
 
#define SGPARTMSG(x)   session_get(x, "PART_MSG")
 
#define SGQUITMSG(x)   session_get(x, "QUIT_MSG")
 
#define PARTMSG(x, r)   (r?r: SGPARTMSG(x)?SGPARTMSG(x):DEFPARTMSG)
 
#define QUITMSG(x)   (SGQUITMSG(x)?SGQUITMSG(x):DEFQUITMSG)
 
#define DEFPART
 
#define polchat_uid(target)   protocol_uid("polchat", target)
 
#define POLCHAT_DEFAULT_HOST   "s1.polchat.pl"
 
#define POLCHAT_DEFAULT_PORT   "14003"
 
#define POLCHAT_ONLY   SESSION_MUSTBELONG | SESSION_MUSTHASPRIVATE
 
#define POLCHAT_FLAGS   POLCHAT_ONLY | SESSION_MUSTBECONNECTED
 
#define POLCHAT_FLAGS_TARGET   POLCHAT_FLAGS | COMMAND_ENABLEREQPARAMS | COMMAND_PARAMASTARGET
 

Funkcje

static int polchat_theme_init ()
 
static int polchat_plugin_destroy ()
 
static char * dword_str (int dword)
 
static char * word_str (short word)
 
static int polchat_sendpkt (session_t *s, short headercode,...)
 
static int polchat_sendmsg (session_t *s, const char *message,...)
 
static int polchat_send_target_msg (session_t *s, const char *target, const char *message,...)
 
static int polchat_validate_uid (void *data, va_list ap)
 
static int polchat_print_version (void *data, va_list ap)
 
static int polchat_session_init (void *data, va_list ap)
 
static int polchat_session_deinit (void *data, va_list ap)
 
static void polchat_handle_disconnect (session_t *s, const char *reason, int type)
 
static void polchat_handle_stream (GDataInputStream *input, gpointer data)
 
static void polchat_handle_failure (GDataInputStream *f, GError *err, gpointer data)
 
static void polchat_handle_connect (GSocketConnection *conn, GInputStream *instream, GOutputStream *outstream, gpointer data)
 
static void polchat_handle_connect_failure (GError *err, gpointer data)
 
static int polchat_command_connect (const char *name, const char **params, session_t *session, const char *target, int quiet)
 
static int polchat_command_disconnect (const char *name, const char **params, session_t *session, const char *target, int quiet)
 
static int polchat_command_reconnect (const char *name, const char **params, session_t *session, const char *target, int quiet)
 
static int polchat_command_msg (const char *name, const char **params, session_t *session, const char *target, int quiet)
 
static int polchat_command_inline_msg (const char *name, const char **params, session_t *session, const char *target, int quiet)
 
static int polchat_command_part (const char *name, const char **params, session_t *session, const char *target, int quiet)
 
static int polchat_command_join (const char *name, const char **params, session_t *session, const char *target, int quiet)
 
static int polchat_command_raw (const char *name, const char **params, session_t *session, const char *target, int quiet)
 
static int polchat_command_target_raw (const char *name, const char **params, session_t *session, const char *target, int quiet)
 
 __attribute__ ((visibility("default")))
 

Zmienne

plugin_t polchat_plugin = { .name = "polchat", .pclass = PLUGIN_PROTOCOL , .destroy = polchat_plugin_destroy, .theme_init = polchat_theme_init }
 
static plugins_params_t polchat_plugin_vars []
 

Dokumentacja definicji

◆ DEFPART

#define DEFPART

◆ DEFPARTMSG

#define DEFPARTMSG   "EKG2 bejbi! http://ekg2.org/"

◆ DEFQUITMSG

#define DEFQUITMSG   "EKG2 - It's better than sex!"

◆ PARTMSG

#define PARTMSG (   x,
 
)    (r?r: SGPARTMSG(x)?SGPARTMSG(x):DEFPARTMSG)

◆ POLCHAT_DEFAULT_HOST

#define POLCHAT_DEFAULT_HOST   "s1.polchat.pl"

◆ POLCHAT_DEFAULT_PORT

#define POLCHAT_DEFAULT_PORT   "14003"

◆ POLCHAT_FLAGS

#define POLCHAT_FLAGS   POLCHAT_ONLY | SESSION_MUSTBECONNECTED

◆ POLCHAT_FLAGS_TARGET

#define POLCHAT_FLAGS_TARGET   POLCHAT_FLAGS | COMMAND_ENABLEREQPARAMS | COMMAND_PARAMASTARGET

◆ POLCHAT_ONLY

#define POLCHAT_ONLY   SESSION_MUSTBELONG | SESSION_MUSTHASPRIVATE

◆ polchat_uid

#define polchat_uid (   target)    protocol_uid("polchat", target)

◆ QUITMSG

#define QUITMSG (   x)    (SGQUITMSG(x)?SGQUITMSG(x):DEFQUITMSG)

◆ SGPARTMSG

#define SGPARTMSG (   x)    session_get(x, "PART_MSG")

◆ SGQUITMSG

#define SGQUITMSG (   x)    session_get(x, "QUIT_MSG")

Dokumentacja funkcji

◆ __attribute__()

__attribute__ ( (visibility("default"))  )

◆ dword_str()

static char* dword_str ( int  dword)
inlinestatic

◆ polchat_command_connect()

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

◆ polchat_command_disconnect()

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

◆ polchat_command_inline_msg()

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

◆ polchat_command_join()

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

◆ polchat_command_msg()

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

◆ polchat_command_part()

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

◆ polchat_command_raw()

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

◆ polchat_command_reconnect()

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

◆ polchat_command_target_raw()

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

◆ polchat_handle_connect()

static void polchat_handle_connect ( GSocketConnection *  conn,
GInputStream *  instream,
GOutputStream *  outstream,
gpointer  data 
)
static

◆ polchat_handle_connect_failure()

static void polchat_handle_connect_failure ( GError *  err,
gpointer  data 
)
static

◆ polchat_handle_disconnect()

static void polchat_handle_disconnect ( session_t s,
const char *  reason,
int  type 
)
static

◆ polchat_handle_failure()

static void polchat_handle_failure ( GDataInputStream *  f,
GError *  err,
gpointer  data 
)
static

◆ polchat_handle_stream()

static void polchat_handle_stream ( GDataInputStream *  input,
gpointer  data 
)
static

◆ polchat_plugin_destroy()

static int polchat_plugin_destroy ( )
static

◆ polchat_print_version()

static int polchat_print_version ( void *  data,
va_list  ap 
)
static

◆ polchat_send_target_msg()

static int polchat_send_target_msg ( session_t s,
const char *  target,
const char *  message,
  ... 
)
static

◆ polchat_sendmsg()

static int polchat_sendmsg ( session_t s,
const char *  message,
  ... 
)
static

◆ polchat_sendpkt()

static int polchat_sendpkt ( session_t s,
short  headercode,
  ... 
)
static

◆ polchat_session_deinit()

static int polchat_session_deinit ( void *  data,
va_list  ap 
)
static

◆ polchat_session_init()

static int polchat_session_init ( void *  data,
va_list  ap 
)
static

◆ polchat_theme_init()

static int polchat_theme_init ( )
static

◆ polchat_validate_uid()

static int polchat_validate_uid ( void *  data,
va_list  ap 
)
static

◆ word_str()

static char* word_str ( short  word)
inlinestatic

Dokumentacja zmiennych

◆ polchat_plugin

plugin_t polchat_plugin = { .name = "polchat", .pclass = PLUGIN_PROTOCOL , .destroy = polchat_plugin_destroy, .theme_init = polchat_theme_init }

◆ polchat_plugin_vars

plugins_params_t polchat_plugin_vars[]
static
Wartość początkowa:
= {
{ "alias" , NULL , 0 , VAR_STR , NULL , NULL },
{ "auto_connect" , "0" , 0 , VAR_BOOL , NULL , NULL },
{ "log_formats" , "irssi" , 0 , VAR_STR , NULL , NULL },
{ "nickname" , NULL , 0 , VAR_STR , NULL , NULL },
{ "password" , NULL , 1 , VAR_STR , NULL , NULL },
{ "port" , "14003" , 0 , VAR_INT , NULL , NULL },
{ "room" , NULL , 0 , VAR_STR , NULL , NULL },
{ "server" , "s1.polchat.pl" , 0 , VAR_STR , NULL , NULL },
{ NULL, NULL, 0, -1, NULL }
}
Definition: vars.h:35
Definition: vars.h:33
#define NULL
Definition: oralog.c:49
Definition: vars.h:34