From 448ed3088ee6b501b5920d93a68ca679abc56802 Mon Sep 17 00:00:00 2001 From: pk910 Date: Thu, 11 Aug 2011 22:22:36 +0200 Subject: [PATCH] some syntax fixes --- ChanUser.h | 6 +++--- IRCParser.c | 2 +- WHOHandler.c | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ChanUser.h b/ChanUser.h index 58a644a..e4f19cf 100644 --- a/ChanUser.h +++ b/ChanUser.h @@ -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; diff --git a/IRCParser.c b/IRCParser.c index 39f3150..c3d9bd5 100644 --- a/IRCParser.c +++ b/IRCParser.c @@ -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); } } diff --git a/WHOHandler.c b/WHOHandler.c index 3cb31a7..f2de5a1 100644 --- a/WHOHandler.c +++ b/WHOHandler.c @@ -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) { -- 2.20.1