diff options
Diffstat (limited to 'parsing.c')
-rw-r--r-- | parsing.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -336,6 +336,19 @@ static void save_users(int channel_id) { } } +static void save_words(int channel_id) { + for(int i = 0; i < WORDS_MAX; i++) { + struct word_t *word = &words[i]; + if(!word->name) + continue; + + while(word) { + pg_word_set(channel_id, word); + word = word->next; + } + } +} + void process() { /* Parsing stuff goes here. */ for(int chan_i = 0; chan_i < channel_get_count(); chan_i++) { @@ -344,6 +357,7 @@ void process() { struct channel_t *channel = channel_get(chan_i); int channel_id = pg_channel_get(channel); pg_users_get(channel_id); + pg_word_get(channel_id); printf("Channel %s\n", channel->name); struct channel_file_t *file = channel->files; while(file) { @@ -371,6 +385,7 @@ void process() { } save_users(channel_id); + save_words(channel_id); user_free(); word_free(); |