From: pk910 Date: Sun, 9 Sep 2012 10:26:09 +0000 (+0200) Subject: Merge remote-tracking branch 'origin/development' X-Git-Url: http://git.pk910.de/?a=commitdiff_plain;h=417334131fa6e5edfc9379a16c40d71db37a97e7;hp=f74d5e297f7b6cbdccf9e3363c8a70f65f4b2614;p=NeonServV5.git Merge remote-tracking branch 'origin/development' --- diff --git a/src/bots.c b/src/bots.c index 2c84a69..693901d 100644 --- a/src/bots.c +++ b/src/bots.c @@ -190,7 +190,7 @@ void requestOp(struct UserNode *user, struct ChanNode *chan) { } void requestInvite(struct UserNode *user, struct ChanNode *chan) { - struct ClientSocket *bot, *userbot = NULL; + struct ClientSocket *bot; struct ChanUser *chanuser = getChanUser(user, chan); char invited = 0; if(chanuser) return; @@ -199,9 +199,6 @@ void requestInvite(struct UserNode *user, struct ChanNode *chan) { invited = 1; putsock(bot, "INVITE %s %s", user->nick, chan->name); } - if(bot->user == user) { - userbot = bot; - } } } diff --git a/src/modules/NeonServ.mod/cmd_neonserv_nicklist.c b/src/modules/NeonServ.mod/cmd_neonserv_nicklist.c index 5043f42..129d79c 100644 --- a/src/modules/NeonServ.mod/cmd_neonserv_nicklist.c +++ b/src/modules/NeonServ.mod/cmd_neonserv_nicklist.c @@ -241,7 +241,7 @@ static void neonserv_cmd_nicklist_async1(struct ClientSocket *client, struct Cli } } else { synced_user = 1; - if(((chanuser->flags & CHANUSERFLAG_OPPED) && db_enfops > caccess) || ((chanuser->flags & CHANUSERFLAG_VOICED) && db_enfvoice > caccess)) + if(((chanuser->flags & CHANUSERFLAG_OPPED) && db_enfops > uaccess) || ((chanuser->flags & CHANUSERFLAG_VOICED) && db_enfvoice > uaccess)) accessbufpos = sprintf(accessbuf, "\003040\003"); else accessbufpos = sprintf(accessbuf, "0"); diff --git a/src/modules/NeonServ.mod/cmd_neonserv_set.c b/src/modules/NeonServ.mod/cmd_neonserv_set.c index 2b78097..692823e 100644 --- a/src/modules/NeonServ.mod/cmd_neonserv_set.c +++ b/src/modules/NeonServ.mod/cmd_neonserv_set.c @@ -368,9 +368,9 @@ static char* neonserv_cmd_set_trigger(struct ClientSocket *client, struct Client MYSQL_RES *res; MYSQL_ROW row; if(client->botid) - printf_mysql_query("SELECT `trigger`, `defaulttrigger`, `id` FROM `bot_channels` LEFT JOIN `bots` ON `botid` = `bots`.`id` WHERE `chanid` = '%d' AND `botclass` = '%d'", chan->channel_id, client->botid); + printf_mysql_query("SELECT `trigger`, `defaulttrigger`, `bot_channels`.`id` FROM `bot_channels` LEFT JOIN `bots` ON `botid` = `bots`.`id` WHERE `chanid` = '%d' AND `botclass` = '%d'", chan->channel_id, client->botid); else - printf_mysql_query("SELECT `trigger`, `defaulttrigger`, `id` FROM `bot_channels` LEFT JOIN `bots` ON `botid` = `bots`.`id` WHERE `chanid` = '%d' AND `botid` = '%d'", chan->channel_id, client->clientid); + printf_mysql_query("SELECT `trigger`, `defaulttrigger`, `bot_channels`.`id` FROM `bot_channels` LEFT JOIN `bots` ON `botid` = `bots`.`id` WHERE `chanid` = '%d' AND `botid` = '%d'", chan->channel_id, client->clientid); res = mysql_use(); row = mysql_fetch_row(res); trigger = (row[0] ? row[0] : row[1]); diff --git a/src/modules/stats.mod/module.c b/src/modules/stats.mod/module.c index c08e0fb..e322754 100644 --- a/src/modules/stats.mod/module.c +++ b/src/modules/stats.mod/module.c @@ -143,20 +143,21 @@ static TIMEQ_CALLBACK(stats_timer_callback) { if (!host) return; si_other.sin_addr = *(struct in_addr*)host->h_addr; } + sendto(sock, pkgbuf, pkgpos, 0, &si_other, sizeof(si_other)); #else struct sockaddr_in si_other; int sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); if (sock == -1) return; si_other.sin_family = AF_INET; si_other.sin_port = htons(STATS_UPDATE_PORT); - si_other.sin_addr.s_addr = inet_addr(client->host); + si_other.sin_addr.s_addr = inet_addr(STATS_UPDATE_HOST); if (si_other.sin_addr.s_addr == INADDR_NONE) { - struct hostent *host = gethostbyname(client->host); + struct hostent *host = gethostbyname(STATS_UPDATE_HOST); if(!host) return; memcpy(&(si_other.sin_addr), host->h_addr_list[0], 4); } + sendto(sock, pkgbuf, pkgpos, 0, (struct sockaddr *) &si_other, sizeof(si_other)); #endif - sendto(sock, pkgbuf, pkgpos, 0, &si_other, sizeof(si_other)); close(sock); }