summaryrefslogtreecommitdiff
path: root/parsing.c
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-11-16 19:19:40 +0100
committerJon Bergli Heier <snakebite@jvnv.net>2010-11-16 19:19:40 +0100
commit6a9af570e7288df584504c7167ba4c1f76cafced (patch)
treea33f85153d96c5d2987d8fbf5f815dc9f74fc697 /parsing.c
parent5af90fb735d357a729d02a661c92af6e865b6d3a (diff)
User lines and minor fixes.
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) {