All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
chatlog.c File Reference
#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <assert.h>
#include <pcreposix.h>
#include "regeng.h"
#include "util.h"
#include "aion.h"
#include "cmd.h"
#include "console.h"
#include "chatlog.h"
#include "event.h"

Macros

#define RE_NAME   "([[:alnum:]]+)"
 
#define RE_ITEM   "\\[item:([[:digit:]]+).*\\]"
 
#define RE_NUM_ROLL   "[0-9\\.]+"
 
#define RE_ITEM_LOOT_SELF   100
 
#define RE_ITEM_LOOT_PLAYER   101
 
#define RE_DAMAGE_INFLICT   200
 
#define RE_DAMAGE_CRITICAL   201
 
#define RE_GROUP_SELF_JOIN   300
 
#define RE_GROUP_SELF_LEAVE   301
 
#define RE_GROUP_SELF_KICK   302
 
#define RE_GROUP_PLAYER_JOIN   303
 
#define RE_GROUP_PLAYER_LEAVE   304
 
#define RE_GROUP_PLAYER_DISCONNECT   305
 
#define RE_GROUP_PLAYER_KICK   306
 
#define RE_GROUP_PLAYER_OFFLINE   307
 
#define RE_GROUP_DISBAND   308
 
#define RE_ALI_SELF_JOIN   350
 
#define RE_ALI_SELF_LEAVE   351
 
#define RE_ALI_SELF_KICK   352
 
#define RE_ALI_PLAYER_JOIN   353
 
#define RE_ALI_PLAYER_LEAVE   354
 
#define RE_ALI_PLAYER_DISCONNECT   355
 
#define RE_ALI_PLAYER_KICK   356
 
#define RE_ALI_PLAYER_OFFLINE   357
 
#define RE_ALI_DISBAND   358
 
#define RE_CHAT_SELF   400
 
#define RE_CHAT_GENERAL   401
 
#define RE_CHAT_WHISPER   402
 
#define RE_CHAT_SHOUT   403
 
#define RE_ROLL_ITEM_SELF   500
 
#define RE_ROLL_ITEM_PLAYER   501
 
#define RE_ROLL_ITEM_PASS   502
 
#define RE_ROLL_ITEM_HIGHEST   503
 
#define RE_ROLL_DICE_SELF   504
 
#define RE_ROLL_DICE_PLAYER   505
 

Functions

static bool chatlog_open (void)
 
void chatlog_parse (uint32_t re_id, const char *matchstr, regmatch_t *rematch, size_t rematch_num)
 
bool chatlog_init ()
 
bool chatlog_readstr (char *chatstr)
 
bool chatlog_poll ()
 
bool chatlog_readfile (char *file)
 
Chatlog Event Processing Functions

These process various events that are triggered by the regeng engine when it parses the chat log.

They process stuff like:

  • Item loot
  • Item rolls
  • Damage taken/received
  • Group joins/leaves
  • Probably much more..
void parse_action_loot_item (char *player, uint32_t itemid)
 
void parse_action_damage_inflict (char *player, char *target, char *damage, char *skill)
 
void parse_action_group_self_join (void)
 
void parse_action_group_self_leave (void)
 
void parse_action_group_player_join (char *who)
 
void parse_action_group_player_leave (char *who)
 
void parse_action_chat_general (char *name, char *txt)
 
void parse_action_chat_whisper (char *name, char *txt)
 
void parse_action_chat_shout (char *name, char *txt)
 
void parse_action_roll_item_self (void)
 
void parse_action_roll_item_player (char *who)
 
void parse_action_roll_item_pass (char *who)
 
void parse_action_roll_item_highest (char *who)
 

Variables

static FILE * chatlog_file = NULL
 
static re_callback_t chatlog_parse
 
struct regeng re_aion []
 

Detailed Description

Aion chatlog parser

Author
Mitja Horvat pinkf.nosp@m.luid.nosp@m.@gmai.nosp@m.l.co.nosp@m.m