summaryrefslogtreecommitdiff
path: root/parsing.c
diff options
context:
space:
mode:
Diffstat (limited to 'parsing.c')
-rw-r--r--parsing.c6
1 files changed, 4 insertions, 2 deletions
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) {