ekg2
GIT master
|
#include "ekg2.h"
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <sys/time.h>
#include <arpa/inet.h>
#include "irc.h"
#include "misc.h"
#include "people.h"
#include "input.h"
#include "autoacts.h"
Definicje | |
#define | GDEBUG |
#define | MARLENE |
#define | OMITCOLON(x) ((*x)==':'?(x+1):(x)) |
#define | dchar(x) debug("%c", x); |
#define | IRC_TO_UPPER(x) irc_toupper_int(x, j->casemapping) |
#define | IRC_TO_LOWER(x) irc_tolower_int(x, j->casemapping) |
#define | IOK2(x) param[x]?OMITCOLON(param[x]):"" |
#define | IOK(x) param[x]?param[x]:"" |
#define | IOK3(x) (x)?(x):"" |
#define | PRINT_INFO if (!chan || !chan->syncmode) print_info |
Funkcje | |
static void | irc_parse_nick_identhost (char *line, char **nick, char **identhost) |
static void | irc_parse_ident_host (char *identhost, char **ident, char **host) |
static void | irc_convert_in (irc_private_t *j, GString *line) |
static int | do_sample_wildcard_match (const char *str, const char *matchstr, const char stopon) |
static void | irc_access_parse (session_t *s, channel_t *chan, people_t *p, int flags) |
static int | gatoi (char *buf, int *a) |
static char * | irc_tolower_int (char *buf, int casemapping) |
int | irc_parse_line (session_t *s, const char *l, int fd) |
static int | irc_c_init (session_t *s, irc_private_t *j, int fd, int ecode, char **param) |
static int | irc_c_error (session_t *s, irc_private_t *j, int fd, int ecode, char **param) |
char * | clean_channel_names (session_t *session, char *channels) |
static int | irc_c_whois (session_t *s, irc_private_t *j, int fd, int ecode, char **param) |
static int | irc_c_list (session_t *s, irc_private_t *j, int fd, int ecode, char **param) |
static int | irc_c_ping (session_t *s, irc_private_t *j, int fd, int ecode, char **param) |
static int | irc_c_nick (session_t *s, irc_private_t *j, int fd, int ecode, char **param) |
static int | irc_c_msg (session_t *s, irc_private_t *j, int fd, int ecode, char **param) |
static int | irc_c_join (session_t *s, irc_private_t *j, int fd, int ecode, char **param) |
static int | irc_c_part (session_t *s, irc_private_t *j, int fd, int ecode, char **param) |
static int | irc_c_kick (session_t *s, irc_private_t *j, int fd, int ecode, char **param) |
static int | irc_c_quit (session_t *s, irc_private_t *j, int fd, int ecode, char **param) |
static int | irc_c_namerpl (session_t *s, irc_private_t *j, int fd, int ecode, char **param) |
static int | irc_c_topic (session_t *s, irc_private_t *j, int fd, int ecode, char **param) |
static int | irc_c_invite (session_t *s, irc_private_t *j, int fd, int ecode, char **param) |
static int | irc_c_mode (session_t *s, irc_private_t *j, int fd, int ecode, char **param) |
Zmienne | |
char * | sopt_keys [SERVOPTS] = { NULL, NULL, "PREFIX", "CHANTYPES", "CHANMODES", "MODES", "CHANLIMIT", "NICKLEN", "IDCHAN" } |
char | sopt_casemapping [] = "CASEMAPPING" |
char * | sopt_casemapping_values [IRC_CASEMAPPING_COUNT] = { "ascii", "rfc1459", "strict-rfc1459" } |
int | mode_act = 0 |
#define dchar | ( | x | ) | debug("%c", x); |
#define GDEBUG |
#define IOK | ( | x | ) | param[x]?param[x]:"" |
#define IOK2 | ( | x | ) | param[x]?OMITCOLON(param[x]):"" |
#define IOK3 | ( | x | ) | (x)?(x):"" |
#define IRC_TO_LOWER | ( | x | ) | irc_tolower_int(x, j->casemapping) |
IRC_TO_LOWER - macro around irc_upper_int, that passes currently casemapping used by server
#define IRC_TO_UPPER | ( | x | ) | irc_toupper_int(x, j->casemapping) |
IRC_TO_UPPER - macro around irc_upper_int, that passes currently casemapping used by server
#define MARLENE |
#define OMITCOLON | ( | x | ) | ((*x)==':'?(x+1):(x)) |
#define PRINT_INFO if (!chan || !chan->syncmode) print_info |
char* clean_channel_names | ( | session_t * | session, |
char * | channels | ||
) |
|
static |
|
static |
int gatoi(char *buf, int *returnvalue)
Simple wrapper around strtol. Convert string pointed by buf to base 10 number, and save it in int value pointed at returnvalue.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
irc_c_list - this function is only for evil hackers, do not touch this stuff unless you want yourself get burned :>
handling some list stuff STATS, WHO, LIST, LINKS, IVITELIST, EXCEPTLIST, BANLIST
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
int irc_parse_line | ( | session_t * | s, |
const char * | l, | ||
int | fd | ||
) |
|
static |
|
static |
irc_tolower_int(char *buf, int casemapping)
Converts buffer pointed at buf to lower case using one of casmapping's: IRC_CASEMAPPING_ASCII, IRC_CASEMAPPING_RFC1459, IRC_CASEMAPPING_RFC1459_STRICT
DO NOT pass strings that can be in unicode;
int mode_act = 0 |
char sopt_casemapping[] = "CASEMAPPING" |
char* sopt_casemapping_values[IRC_CASEMAPPING_COUNT] = { "ascii", "rfc1459", "strict-rfc1459" } |