ekg2
GIT master
|
#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"
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 [] |
#define DEFPART |
#define DEFPARTMSG "EKG2 bejbi! http://ekg2.org/" |
#define DEFQUITMSG "EKG2 - It's better than sex!" |
#define PARTMSG | ( | x, | |
r | |||
) | (r?r: SGPARTMSG(x)?SGPARTMSG(x):DEFPARTMSG) |
#define POLCHAT_DEFAULT_HOST "s1.polchat.pl" |
#define POLCHAT_DEFAULT_PORT "14003" |
#define POLCHAT_FLAGS POLCHAT_ONLY | SESSION_MUSTBECONNECTED |
#define POLCHAT_FLAGS_TARGET POLCHAT_FLAGS | COMMAND_ENABLEREQPARAMS | COMMAND_PARAMASTARGET |
#define POLCHAT_ONLY SESSION_MUSTBELONG | SESSION_MUSTHASPRIVATE |
#define polchat_uid | ( | target | ) | protocol_uid("polchat", target) |
#define QUITMSG | ( | x | ) | (SGQUITMSG(x)?SGQUITMSG(x):DEFQUITMSG) |
#define SGPARTMSG | ( | x | ) | session_get(x, "PART_MSG") |
#define SGQUITMSG | ( | x | ) | session_get(x, "QUIT_MSG") |
__attribute__ | ( | (visibility("default")) | ) |
|
inlinestatic |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
inlinestatic |
plugin_t polchat_plugin = { .name = "polchat", .pclass = PLUGIN_PROTOCOL , .destroy = polchat_plugin_destroy, .theme_init = polchat_theme_init } |
|
static |