some syntax fixes
authorpk910 <philipp@zoelle1.de>
Thu, 11 Aug 2011 20:22:36 +0000 (22:22 +0200)
committerpk910 <philipp@zoelle1.de>
Thu, 11 Aug 2011 20:22:36 +0000 (22:22 +0200)
ChanUser.h
IRCParser.c
WHOHandler.c

index 58a644a46aa3422b567da51cc125fe821c3cf8a5..e4f19cfdbacea6980275bbae312cbd474290287f 100644 (file)
@@ -1,11 +1,11 @@
 #ifndef _ChanUser_h
 #define _ChanUser_h
 
-#define CHANUSERFLAG_OPPED  0x01;
-#define CHANUSERFLAG_VOICED 0x02;
+#define CHANUSERFLAG_OPPED  0x01
+#define CHANUSERFLAG_VOICED 0x02
 
 
-#define CHANUSERFLAG_OPPED_OR_VOICED (CHANUSERFLAG_OPPED | CHANUSERFLAG_VOICED);
+#define CHANUSERFLAG_OPPED_OR_VOICED (CHANUSERFLAG_OPPED | CHANUSERFLAG_VOICED)
 
 struct ChanNode;
 struct UserNode;
index 39f315040a66076ed8e2caa7de79215f160548f8..c3d9bd54160efbda9e1f01c9d575ab5fb3d753d1 100644 (file)
@@ -87,7 +87,7 @@ static USERLIST_CALLBACK(got_channel_userlist) {
     putsock(client, "PRIVMSG %s :[BOT JOIN] Users on this Channel:", chan->name);
     struct ChanUser *chanuser;
     for(chanuser = getChannelUsers(chan, NULL); chanuser; chanuser = getChannelUsers(chan, chanuser)) {
-        putsock(client, "PRIVMSG %s :  %s!%s@%s [%s]  rights: %d", chanuser->user->nick, chanuser->user->ident, chanuser->user->host, ((chanuser->user->flags & USERFLAG_ISAUTHED) ? chanuser->user->auth : "0"), chanuser->flags);
+        putsock(client, "PRIVMSG %s :  %s!%s@%s [%s]  rights: %d", chan->name, chanuser->user->nick, chanuser->user->ident, chanuser->user->host, ((chanuser->user->flags & USERFLAG_ISAUTHED) ? chanuser->user->auth : "0"), chanuser->flags);
     }
 }
 
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) {