1
0
mirror of https://github.com/anope/anope.git synced 2026-07-01 11:06:38 +02:00

BUILD : 1.7.16 (1180) BUGS : 614 NOTES : Fixed: [1] MySQL not storing passwords at all (blank passes) [2] saving of ttb with MySQL/RDB was completely fubar [3] do not send PONG-flood anymore on db-load...

git-svn-id: svn://svn.anope.org/anope/trunk@1180 31f1291d-b8d6-0310-a050-a5561fc1590b


git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@901 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b
2006-10-17 18:13:32 +00:00
parent af5f8af76f
commit 4d638356f5
7 changed files with 59 additions and 20 deletions
+3 -1
View File
@@ -5,7 +5,9 @@ Anope Version S V N
10/16 F MySQL functions did not always escape all values correctly. [#612]
10/16 F Made anoperc restart to accepts arguments like anoperc start. [#611]
10/16 F MySQL query debug quoted displayed queries just a tad too much. [ #00]
01/16 F MySQL query error in RDB functions. [ #00]
10/16 F MySQL query error in RDB functions. [ #00]
10/17 F Erroneous code caused MySQL to store all passwords as blank. [#614]
10/17 F Saving of ttb-data when using MySQL. [ #00]
Anope Version 1.7.16
--------------------
+8 -1
View File
@@ -1,6 +1,13 @@
Anope Version S V N
--------------------
- NONE
- CREATE TABLE anope_cs_ttb (
ct_id int(11) NOT NULL auto_increment,
channel varchar(255) NOT NULL default '',
ttb_id int(11) NOT NULL default '0',
value int(11) NOT NULL default '0',
PRIMARY KEY (ct_id)
) TYPE=MyISAM
- ALTER TABLE anope_cs_info DROP ttb
Anope Version 1.7.16
--------------------
+12 -1
View File
@@ -111,7 +111,6 @@ CREATE TABLE anope_cs_info (
memomax smallint(5) unsigned NOT NULL default '0',
botnick varchar(255) NOT NULL default '',
botflags int(10) unsigned NOT NULL default '0',
ttb smallint(6) NOT NULL default '0',
bwcount smallint(6) NOT NULL default '0',
capsmin smallint(6) NOT NULL default '0',
capspercent smallint(6) NOT NULL default '0',
@@ -137,6 +136,18 @@ CREATE TABLE anope_cs_levels (
PRIMARY KEY (cl_id)
) TYPE=MyISAM;
--
-- Table structure for table `anope_cs_ttb`
--
DROP TABLE IF EXISTS anope_cs_ttb;
CREATE TABLE anope_cs_ttb (
ct_id int(11) NOT NULL auto_increment,
channel varchar(255) NOT NULL default '',
ttb_id int(11) NOT NULL default '0',
value int(11) NOT NULL default '0',
PRIMARY KEY (ct_id)
) TYPE=MyISAM;
--
-- Table structure for table `anope_hs_core`
--
+1
View File
@@ -1022,6 +1022,7 @@ void save_cs_rdb_dbase(void)
rdb_clear_table("anope_cs_levels");
rdb_clear_table("anope_cs_akicks");
rdb_clear_table("anope_cs_badwords");
rdb_clear_table("anope_cs_ttb");
for (i = 0; i < 256; i++) {
for (ci = chanlists[i]; ci; ci = ci->next) {
+29 -8
View File
@@ -246,7 +246,7 @@ char *db_mysql_secure(char *pass)
}
#else
if (pass) {
if (!pass) {
snprintf(epass, sizeof(epass), "''");
} else if ((!MysqlSecure) || (strcmp(MysqlSecure, "") == 0)) {
snprintf(epass, sizeof(epass), "'%s'", pass);
@@ -455,7 +455,7 @@ void db_mysql_save_cs_info(ChannelInfo * ci)
"forbidby='%s',forbidreason='%s',bantype='%d',accesscount='%d',"
"akickcount='%d',mlock_on='%d',mlock_off='%d',mlock_limit='%d',"
"mlock_key='%s',mlock_flood='%s',mlock_redirect='%s',entry_message='%s',"
"memomax='%d',botnick='%s',botflags='%d',ttb='%d',bwcount='%d',"
"memomax='%d',botnick='%s',botflags='%d',bwcount='%d',"
"capsmin='%d',capspercent='%d',floodlines='%d',floodsecs='%d',"
"repeattimes='%d',active='1' WHERE name='%s'",
cifoundernick,
@@ -474,7 +474,6 @@ void db_mysql_save_cs_info(ChannelInfo * ci)
(int) ci->memos.memomax,
cibotnick,
(int) ci->botflags,
(int) ci->ttb,
(int) ci->bwcount,
(int) ci->capsmin,
(int) ci->capspercent,
@@ -617,6 +616,16 @@ void db_mysql_save_cs_info(ChannelInfo * ci)
}
}
/* TTB's */
for (j = 0; j < TTB_SIZE; j++) {
snprintf(sqlcmd, MAX_SQL_BUF, "INSERT DELAYED INTO anope_cs_ttb (channel, ttb_id, value)"
" VALUES ('%s', %d, %d)", ciname, j, ci->ttb[j]);
if (db_mysql_query(sqlcmd)) {
log_perror("Can't create sql query: %s", sqlcmd);
db_mysql_error(MYSQL_WARNING, "query");
}
}
free(ciname);
free(cifoundernick); /* mark */
free(cisuccessornick); /* mark */
@@ -1148,7 +1157,7 @@ void db_mysql_load_cs_dbase(void)
return;
snprintf(sqlcmd, MAX_SQL_BUF,
"SELECT `name`,`founder`,`successor`,`founderpass`,`descr`,`url`,`email`,`time_registered`,`last_used`,`last_topic`,`last_topic_setter`,`last_topic_time`,`flags`,`forbidby`,`forbidreason`,`bantype`,`accesscount`,`akickcount`,`mlock_on`,`mlock_off`,`mlock_limit`,`mlock_key`,`mlock_flood`,`mlock_redirect`,`entry_message`,`memomax`,`botnick`,`botflags`,`ttb`,`bwcount`,`capsmin`,`capspercent`,`floodlines`,`floodsecs`,`repeattimes` FROM `anope_cs_info`");
"SELECT `name`,`founder`,`successor`,`founderpass`,`descr`,`url`,`email`,`time_registered`,`last_used`,`last_topic`,`last_topic_setter`,`last_topic_time`,`flags`,`forbidby`,`forbidreason`,`bantype`,`accesscount`,`akickcount`,`mlock_on`,`mlock_off`,`mlock_limit`,`mlock_key`,`mlock_flood`,`mlock_redirect`,`entry_message`,`memomax`,`botnick`,`botflags`,`bwcount`,`capsmin`,`capspercent`,`floodlines`,`floodsecs`,`repeattimes` FROM `anope_cs_info`");
if (db_mysql_query(sqlcmd)) {
log_perror("Can't create sql query: %s", sqlcmd);
db_mysql_error(MYSQL_WARNING, "query");
@@ -1323,16 +1332,28 @@ void db_mysql_load_cs_dbase(void)
ci->bi = findbot(mysql_row[26]);
ci->botflags = atoi(mysql_row[27]);
ci->ttb = scalloc(2 * TTB_SIZE, 1);
for (j = 0; j < TTB_SIZE; j++) {
ci->ttb[j] = 0;
}
ci->capsmin = atoi(mysql_row[30]);
ci->capspercent = atoi(mysql_row[31]);
ci->floodlines = atoi(mysql_row[32]);
ci->floodsecs = atoi(mysql_row[33]);
ci->repeattimes = atoi(mysql_row[34]);
ci->ttb = scalloc(2 * TTB_SIZE, 1);
snprintf(sqlcmd, MAX_SQL_BUF, "SELECT `ttb_id`, `value` FROM `anope_cs_ttb` WHERE `channel` = '%s'", tempstr);
if (db_mysql_query(sqlcmd)) {
log_perror("Can't create sql query: %s", sqlcmd);
db_mysql_error(MYSQL_WARNING, "query");
}
res = mysql_store_result(mysql);
while ((row = mysql_fetch_row(res))) {
j = atoi(row[0]);
ci->ttb[j] = atoi(row[1]);
}
for (j = 0; j < TTB_SIZE; j++) {
if (!ci->ttb[j])
ci->ttb[j] = 0;
}
ci->bwcount = atoi(mysql_row[29]);
if (ci->bwcount) {
ci->badwords = scalloc(ci->bwcount, sizeof(BadWord));
+1 -8
View File
@@ -232,6 +232,7 @@ int rdb_cs_delchan(ChannelInfo * ci)
rdb_scrub_table("anope_cs_akicks", buf);
rdb_scrub_table("anope_cs_levels", buf);
rdb_scrub_table("anope_cs_badwords", buf);
rdb_scrub_table("anope_cs_ttb", buf);
if (ci->founder) {
snprintf(buf, sizeof(buf),
"update anope_ns_core set channelcount=channelcount-1 where display='%s'",
@@ -462,41 +463,33 @@ void rdb_load_dbases(void)
{
if (!skeleton) {
rdb_load_ns_dbase();
anope_cmd_pong(ServerName, ServerName);
if (debug)
alog("debug: RDB Loaded NickServ DataBase (1/8)");
if (s_HostServ) {
rdb_load_hs_dbase();
anope_cmd_pong(ServerName, ServerName);
if (debug)
alog("debug: RDB Loaded HostServ DataBase (2/8)");
}
if (s_BotServ) {
rdb_load_bs_dbase();
anope_cmd_pong(ServerName, ServerName);
if (debug)
alog("debug: RDB Loaded BotServ DataBase (3/8)");
}
rdb_load_cs_dbase();
anope_cmd_pong(ServerName, ServerName);
if (debug)
alog("debug: RDB Loaded ChanServ DataBase (4/8)");
}
rdb_load_os_dbase();
anope_cmd_pong(ServerName, ServerName);
if (debug)
alog("debug: RDB Loaded OperServ DataBase (5/8)");
rdb_load_news();
anope_cmd_pong(ServerName, ServerName);
if (debug)
alog("debug: RDB Loaded News DataBase (6/8)");
rdb_load_exceptions();
anope_cmd_pong(ServerName, ServerName);
if (debug)
alog("debug: RDB Loaded Exception Database (7/8)");
if (PreNickDBName) {
rdb_load_ns_req_dbase();
anope_cmd_pong(ServerName, ServerName);
if (debug)
alog("debug: RDB Loaded PreNick DataBase (8/8)");
} else {
+5 -1
View File
@@ -9,10 +9,14 @@ VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="16"
VERSION_EXTRA="-svn"
VERSION_BUILD="1179"
VERSION_BUILD="1180"
# $Log$
#
# BUILD : 1.7.16 (1180)
# BUGS : 614
# NOTES : Fixed: [1] MySQL not storing passwords at all (blank passes) [2] saving of ttb with MySQL/RDB was completely fubar [3] do not send PONG-flood anymore on db-load...
#
# BUILD : 1.7.16 (1179)
# BUGS :
# NOTES : Changed uber-mysql-validation-detection to use AM_LINK_IFELSE as it should have used all along...