X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=tools.h;h=54a0cfa9e7ec8489732350b022f785f1e15e0fc9;hb=795115bf680185ae01043bd1222b78bfed8c1d87;hp=03bdb64399281efbf3f72c57d51849258dab4461;hpb=2ac843a40dfa151e8ccc12097e96b52ae1ae0826;p=NeonServV5.git diff --git a/tools.h b/tools.h index 03bdb64..54a0cfa 100644 --- a/tools.h +++ b/tools.h @@ -3,8 +3,9 @@ #include "main.h" -#define TABLE_FLAG_USE_POINTER 0x01 -#define TABLE_FLAG_COL_BOLD 0x02 +#define TABLE_FLAG_USE_POINTER 0x01 +#define TABLE_FLAG_COL_BOLD 0x02 +#define TABLE_FLAG_COL_CONTENTS 0x04 struct ClientSocket; struct UserNode; @@ -38,6 +39,8 @@ int match(const char *mask, const char *name); struct Table *table_init(int width, int length, int flags); int table_add(struct Table *table, char **entry); +int table_change(struct Table *table, int row, char **entry); +int table_change_field(struct Table *table, int row, int col, char *entry); int table_set_bold(struct Table *table, int collum, int bold); char **table_end(struct Table *table); void table_free(struct Table *table); @@ -52,6 +55,7 @@ struct ModeBuffer* initModeBuffer(struct ClientSocket *client, struct ChanNode * #define modeBufferVoice(MODEBUF,USER) modeBufferSet(MODEBUF, 1, 'v', USER) #define modeBufferDevoice(MODEBUF,USER) modeBufferSet(MODEBUF, 0, 'v', USER) #define modeBufferBan(MODEBUF,MASK) modeBufferSet(MODEBUF, 1, 'b', MASK) +#define modeBufferUnban(MODEBUF,MASK) modeBufferSet(MODEBUF, 0, 'b', MASK) void modeBufferSet(struct ModeBuffer *modeBuf, int add, char mode, char *param); void flushModeBuffer(struct ModeBuffer *modeBuf); void freeModeBuffer(struct ModeBuffer *modeBuf); @@ -59,6 +63,8 @@ void freeModeBuffer(struct ModeBuffer *modeBuf); int is_ircmask(const char *text); char* generate_banmask(struct UserNode *user, char *buffer); +char* make_banmask(char *input, char* buffer); +int isFakeHost(char *host); void init_tools();