some syntax fixes
[NeonServV5.git] / WHOHandler.c
index 3cb31a702ca84497c6b84e2466f3545bc1bdd967..f2de5a1fd1cee519aa4c0a7527406e34576d11db 100644 (file)
@@ -12,8 +12,8 @@ struct WHOQueueEntry {
     struct ChanNode *chan;
     struct UserNode *user;
     struct WHOQueueEntry *next;
-    userlist_callback_t callback;
-}
+    userlist_callback_t *callback;
+};
 
 static struct WHOQueueEntry *first_entry = NULL, *last_entry = NULL;
 
@@ -32,7 +32,7 @@ static struct WHOQueueEntry* addWHOQueueEntry(struct ClientSocket *client) {
         first_entry = entry;
 }
 
-static struct WHOQueueEntry* getNextWHOQueueEntry(struct ClientSocket *client, int remove) {
+static struct WHOQueueEntry* getNextWHOQueueEntry(struct ClientSocket *client, int freeEntry) {
     if(!first_entry) return NULL;
     struct WHOQueueEntry *entry;
     for(entry = first_entry; entry; entry = entry->next) {
@@ -40,7 +40,7 @@ static struct WHOQueueEntry* getNextWHOQueueEntry(struct ClientSocket *client, i
             break;
     }
     if(entry == NULL) return NULL;
-    if(remove) {
+    if(freeEntry) {
         first_entry = first_entry->next;
         if(last_entry == first_entry)
             last_entry = NULL;
@@ -60,7 +60,7 @@ void get_userlist(struct ChanNode *chan, userlist_callback_t callback) {
     entry->chan = chan;
     entry->callback = callback;
     //WHO ".$channel->getName().",".$id." d%tuhnaf,".$id
-    putsock(bot, "WHO %s,%d %tuhnaf,%d", chan->name, entry->type, entry->type);
+    putsock(bot, "WHO %s,%d %%tuhnaf,%d", chan->name, entry->type, entry->type);
 }
 
 void recv_whohandler_354(struct ClientSocket *client, char **argv, unsigned int argc) {