From 6a9af570e7288df584504c7167ba4c1f76cafced Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Tue, 16 Nov 2010 19:19:40 +0100 Subject: User lines and minor fixes. --- parsing.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'parsing.c') diff --git a/parsing.c b/parsing.c index f0e4fb5..6759104 100644 --- a/parsing.c +++ b/parsing.c @@ -9,6 +9,7 @@ #include "user.h" #include "word.h" #include "config.h" +#include "pg.h" #define NICK_BUFFER_SIZE 0x100 #define TEXT_BUFFER_SIZE 0x400 @@ -321,7 +322,7 @@ static void process_file(FILE *f, struct channel_t *channel, struct regexset_t * } } -static void save_users(struct channel_t *channel) { +static void save_users(int channel_id) { for(int i = 0; i < USERS_MAX; i++) { struct user_t *user = &users[i]; if(!user->nick) @@ -329,7 +330,7 @@ static void save_users(struct channel_t *channel) { while(user) { if(!user->real_user) - pg_user_set(channel, user); + pg_user_set(channel_id, user); user = user->next; } } @@ -342,6 +343,7 @@ void process() { word_init(); struct channel_t *channel = channel_get(chan_i); int channel_id = pg_channel_get(channel); + pg_users_get(channel_id); printf("Channel %s\n", channel->name); struct channel_file_t *file = channel->files; while(file) { -- cgit v1.2.3