From: pk910 Date: Sun, 11 Sep 2011 23:12:52 +0000 (+0200) Subject: fixed VALID_NICK_CHARS and WHOHandler multi-query support X-Git-Tag: v5.3~432 X-Git-Url: http://git.pk910.de/?a=commitdiff_plain;h=af0b5a1bc8ee6d5070e3a4b10eaf07d5b077653d;p=NeonServV5.git fixed VALID_NICK_CHARS and WHOHandler multi-query support --- diff --git a/DATABASE.txt b/DATABASE.txt index e9d5397..053096a 100644 --- a/DATABASE.txt +++ b/DATABASE.txt @@ -3,6 +3,7 @@ ALTER TABLE `bots` CHANGE `botclass` `botclass` INT( 10 ) NOT NULL; ALTER TABLE `users` CHANGE `user_lang` `user_lang` VARCHAR( 6 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL; +ALTER TABLE `users` ADD `user_reply_privmsg` TINYINT( 1 ) NOT NULL ; CREATE TABLE IF NOT EXISTS `godlog` ( `godlog_id` int(11) NOT NULL AUTO_INCREMENT, @@ -13,7 +14,7 @@ CREATE TABLE IF NOT EXISTS `godlog` ( PRIMARY KEY (`godlog_id`) ) ENGINE=MyISAM; -ALTER TABLE `channels` ADD `channel_lastgiveowner` INT( 11 ) NOT NULL AFTER `channel_lastvisit` +ALTER TABLE `channels` ADD `channel_lastgiveowner` INT( 11 ) NOT NULL AFTER `channel_lastvisit`; CREATE TABLE IF NOT EXISTS `owner_history` ( `owner_history_id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY , @@ -26,11 +27,11 @@ INDEX ( `owner_history_cid` ) ALTER TABLE `chanusers` ADD INDEX ( `chanuser_cid` ) ; ALTER TABLE `chanusers` ADD INDEX ( `chanuser_uid` ) ; -ALTER TABLE `bot_binds` ADD `chan_access` VARCHAR( 256 ) NULL DEFAULT NULL AFTER `parameters` +ALTER TABLE `bot_binds` ADD `chan_access` VARCHAR( 256 ) NULL DEFAULT NULL AFTER `parameters`; -ALTER TABLE `bot_binds` CHANGE `global_access` `global_access` INT( 3 ) NULL +ALTER TABLE `bot_binds` CHANGE `global_access` `global_access` INT( 3 ) NULL; -ALTER TABLE `bans` CHANGE `ban_owner` `ban_owner` INT( 11 ) NOT NULL +ALTER TABLE `bans` CHANGE `ban_owner` `ban_owner` INT( 11 ) NOT NULL; ALTER TABLE `channels` ADD `channel_exttopic` TINYINT( 1 ) NOT NULL AFTER `channel_topicmask` , -ADD `channel_exttopic_topic` VARCHAR( 512 ) NOT NULL AFTER `channel_exttopic` +ADD `channel_exttopic_topic` VARCHAR( 512 ) NOT NULL AFTER `channel_exttopic`; diff --git a/WHOHandler.c b/WHOHandler.c index b74fb5c..4f96756 100644 --- a/WHOHandler.c +++ b/WHOHandler.c @@ -32,12 +32,13 @@ static struct WHOQueueEntry* addWHOQueueEntry(struct ClientSocket *client) { } entry->next = NULL; entry->client = client; - if(last_entry) + if(last_entry) { last_entry->next = entry; - else last_entry = entry; - if(!first_entry) + } else { + last_entry = entry; first_entry = entry; + } return entry; } diff --git a/main.h b/main.h index 71b98db..9aa15a0 100644 --- a/main.h +++ b/main.h @@ -64,7 +64,7 @@ #define MAXMODES 6 //valid nick chars -#define VALID_NICK_CHARS "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890{|}~[\\]^_`" +#define VALID_NICK_CHARS "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890{|}~[\\]^-_`" //the first char is a little bit different // 0 1 2 3 4 5 6 // 1234567890123456789012345678901234567890123456789012345678 9012 62