1
0
mirror of https://github.com/anope/anope.git synced 2026-06-25 03:06:37 +02:00

BUILD : 1.7.17 (1210) BUGS : 645 646 647 NOTES : Fixed anoperc restart, nickchanges on TS6, typo in CHAN_REGISTER_NONE_CHANNEL; added error messages when RDB functions fail (thx heinz)

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


git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@929 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b
2006-12-24 17:51:32 +00:00
parent 6e7add309d
commit 4e409e31cb
19 changed files with 249 additions and 79 deletions
+4
View File
@@ -14,6 +14,10 @@ Anope Version S V N
12/09 F Langfiles had CHANAKILL instead of CHANKILL in syntax lines. [#640]
12/10 F NickServ ALIST not accepting Founder as level param. [#629]
12/10 F EVENT_TOPIC_UPDATES was not always sent when it should be. [#641]
12/24 F anoperc sends SIGTERM for restart and uses command line params [#645]
12/24 F Nickname changes were not recognised on TS6-based IRCd's [#646]
12/24 F Small typo in CHAN_REGISTER_NONE_CHANNEL [#647]
12/24 F Display error messages when RDB functions fail [ #00]
Anope Version 1.7.17
--------------------
+1 -1
View File
@@ -1055,7 +1055,7 @@ CHAN_REGISTERED
CHAN_PASSWORD_IS
La teva clau pel canal es %s - Recorda-la per un us futur.
CHAN_REGISTER_NONE_CHANNEL
You have attempted to register a none existant channel %s
You have attempted to register a nonexistent channel %s
CHAN_SYMBOL_REQUIRED
Please use the symbol of # or & when attempting to register
+1 -1
View File
@@ -1038,7 +1038,7 @@ CHAN_REGISTERED
CHAN_PASSWORD_IS
Your channel password is %s - remember it for later use.
CHAN_REGISTER_NONE_CHANNEL
You have attempted to register a none existant channel %s
You have attempted to register a nonexistent channel %s
CHAN_SYMBOL_REQUIRED
Please use the symbol of # or & when attempting to register
+1 -1
View File
@@ -1053,7 +1053,7 @@ CHAN_REGISTERED
CHAN_PASSWORD_IS
Ï êùäéêüò ôïõ êáíáëéïý åßíáé %s - èõìÞóïõ ôïí ãéáôß èá ôïí ÷ñåéáóôåßò ìåôÜ.
CHAN_REGISTER_NONE_CHANNEL
You have attempted to register a none existant channel %s
You have attempted to register a nonexistent channel %s
CHAN_SYMBOL_REQUIRED
Please use the symbol of # or & when attempting to register
+1 -1
View File
@@ -1046,7 +1046,7 @@ CHAN_REGISTERED
CHAN_PASSWORD_IS
Csatorna jelszava: %s - Jegyezd fel a késõbbi használathoz.
CHAN_REGISTER_NONE_CHANNEL
You have attempted to register a none existant channel %s
You have attempted to register a nonexistent channel %s
CHAN_SYMBOL_REQUIRED
Please use the symbol of # or & when attempting to register
+1 -1
View File
@@ -1130,7 +1130,7 @@ CHAN_PASSWORD_IS
Has³o Twojego kana³u to %s
Zapamiêtaj do przysz³ego u¿ytku.
CHAN_REGISTER_NONE_CHANNEL
You have attempted to register a none existant channel %s
You have attempted to register a nonexistent channel %s
CHAN_SYMBOL_REQUIRED
Please use the symbol of # or & when attempting to register
+1 -1
View File
@@ -1049,7 +1049,7 @@ CHAN_REGISTERED
CHAN_PASSWORD_IS
Ïàðîëü Âàøåãî êàíàëà - %s - íå çàáûâàéòå åãî!
CHAN_REGISTER_NONE_CHANNEL
You have attempted to register a none existant channel %s
You have attempted to register a nonexistent channel %s
CHAN_SYMBOL_REQUIRED
Please use the symbol of # or & when attempting to register
+1 -1
View File
@@ -1060,7 +1060,7 @@ CHAN_REGISTERED
CHAN_PASSWORD_IS
Kanal þifreniz %s - ilerde kullanacaðýnýz için unutmayýnýz ve kimseye söylemeyiniz.
CHAN_REGISTER_NONE_CHANNEL
You have attempted to register a none existant channel %s
You have attempted to register a nonexistent channel %s
CHAN_SYMBOL_REQUIRED
Please use the symbol of # or & when attempting to register
+6 -2
View File
@@ -98,8 +98,9 @@ elif [ "$1" = "status" ] ; then
elif [ "$1" = "restart" ] ; then
isAnopeRunning
echo "Restarting Anope"
kill -1 `cat $ANOPEPID`
kill -15 `cat $ANOPEPID`
sleep 1
shift
$ANOPROG $*
elif [ "$1" = "rehash" ] ; then
@@ -119,10 +120,13 @@ elif [ "$1" = "help" ] ; then
echo "$0 start Start Anope"
echo " Additional parameters may be passed"
echo " (e.g. $0 start -nofork)"
echo " For a list of type $0 $1 paramlist"
echo " For a list type $0 $1 paramlist"
echo "$0 stop Shutdown Anope"
echo "$0 status Show Anope's Status"
echo "$0 restart Restart Anope (Databases will be saved)"
echo " Additional parameters may be passed"
echo " (e.g. $0 restart -logchan)"
echi " For a list type $0 $1 paramlist"
echo "$0 rehash Rehash Configuration and Save Databases"
echo "$0 version Return Anope Version and Build Information"
echo "$0 help Show this help menu"
+12 -3
View File
@@ -540,15 +540,24 @@ void save_bs_rdb_dbase(void)
if (!rdb_open())
return;
rdb_tag_table("anope_bs_core");
if (rdb_tag_table("anope_bs_core") == 0) {
alog("Unable to tag table 'anope_bs_core' - BotServ RDB save failed.");
return;
}
for (i = 0; i < 256; i++) {
for (bi = botlists[i]; bi; bi = bi->next) {
rdb_save_bs_core(bi);
if (rdb_save_bs_core(bi) == 0) {
alog("Unable to save BotInfo for %s - BotServ RDB save failed.", bi->nick);
return;
}
}
}
rdb_clean_table("anope_bs_core");
if (rdb_clean_table("anope_bs_core") == 0) {
alog("Unable to clean table 'anope_bs_core' - BotServ RDB save failed.");
return;
}
rdb_close();
#endif
+60 -15
View File
@@ -998,27 +998,72 @@ void save_cs_rdb_dbase(void)
if (!rdb_open())
return;
rdb_tag_table("anope_cs_info");
rdb_tag_table("anope_cs_access");
rdb_tag_table("anope_cs_levels");
rdb_tag_table("anope_cs_akicks");
rdb_tag_table("anope_cs_badwords");
rdb_tag_table("anope_cs_ttb");
rdb_tag_table_where("anope_ms_info", "serv='CHAN'");
if (rdb_tag_table("anope_cs_info") == 0) {
alog("Unable to tag table 'anope_cs_info' - ChanServ RDB save failed.");
return;
}
if (rdb_tag_table("anope_cs_access") == 0) {
alog("Unable to tag table 'anope_cs_access' - ChanServ RDB save failed.");
return;
}
if (rdb_tag_table("anope_cs_levels") == 0) {
alog("Unable to tag table 'anope_cs_levels' - ChanServ RDB save failed.");
return;
}
if (rdb_tag_table("anope_cs_akicks") == 0) {
alog("Unable to tag table 'anope_cs_akicks' - ChanServ RDB save failed.");
return;
}
if (rdb_tag_table("anope_cs_badwords") == 0) {
alog("Unable to tag table 'anope_cs_badwords' - ChanServ RDB save failed.");
return;
}
if (rdb_tag_table("anope_cs_ttb") == 0) {
alog("Unable to tag table 'anope_cs_ttb' - ChanServ RDB save failed.");
return;
}
if (rdb_tag_table_where("anope_ms_info", "serv='CHAN'") == 0) {
alog("Unable to tag table 'anope_ms_info' - ChanServ RDB save failed.");
return;
}
for (i = 0; i < 256; i++) {
for (ci = chanlists[i]; ci; ci = ci->next) {
rdb_save_cs_info(ci);
if (rdb_save_cs_info(ci) == 0) {
alog("Unable to save ChanInfo for %s - ChanServ RDB save failed.", ci->name);
return;
}
} /* for (chanlists[i]) */
} /* for (i) */
rdb_clean_table("anope_cs_info");
rdb_clean_table("anope_cs_access");
rdb_clean_table("anope_cs_levels");
rdb_clean_table("anope_cs_akicks");
rdb_clean_table("anope_cs_badwords");
rdb_clean_table("anope_cs_ttb");
rdb_clean_table_where("anope_ms_info", "serv='CHAN'");
if (rdb_clean_table("anope_cs_info") == 0) {
alog("Unable to clean table 'anope_cs_info' - ChanServ RDB save failed.");
return;
}
if (rdb_clean_table("anope_cs_access") == 0) {
alog("Unable to clean table 'anope_cs_access' - ChanServ RDB save failed.");
return;
}
if (rdb_clean_table("anope_cs_levels") == 0) {
alog("Unable to clean table 'anope_cs_levels' - ChanServ RDB save failed.");
return;
}
if (rdb_clean_table("anope_cs_akicks") == 0) {
alog("Unable to clean table 'anope_cs_akicks' - ChanServ RDB save failed.");
return;
}
if (rdb_clean_table("anope_cs_badwords") == 0) {
alog("Unable to clean table 'anope_cs_badwords' - ChanServ RDB save failed.");
return;
}
if (rdb_clean_table("anope_cs_ttb") == 0) {
alog("Unable to clean table 'anope_cs_ttb' - ChanServ RDB save failed.");
return;
}
if (rdb_clean_table_where("anope_ms_info", "serv='CHAN'") == 0) {
alog("Unable to clean table 'anope_ms_info' - ChanServ RDB save failed.");
return;
}
rdb_close();
#endif
+14 -4
View File
@@ -331,7 +331,8 @@ void delHostCore(char *nick)
if (rdb_open()) {
q_nick = rdb_quote(nick);
snprintf(clause, sizeof(clause), "nick='%s'", q_nick);
rdb_scrub_table("anope_hs_core", clause);
if (rdb_scrub_table("anope_hs_core", clause) == 0)
alog("Unable to scrub table 'anope_hs_core' - HostServ RDB update failed.");
rdb_close();
free(q_nick);
}
@@ -506,15 +507,24 @@ void save_hs_rdb_dbase(void)
if (!rdb_open())
return;
rdb_tag_table("anope_hs_core");
if (rdb_tag_table("anope_hs_core") == 0) {
alog("Unable to tag table 'anope_hs_core' - HostServ RDB save failed.");
return;
}
current = head;
while (current != NULL) {
rdb_save_hs_core(current);
if (rdb_save_hs_core(current) == 0) {
alog("Unable to save HostCore for %s - HostServ RDB save failed.", current->nick);
return;
}
current = current->next;
}
rdb_clean_table("anope_hs_core");
if (rdb_clean_table("anope_hs_core") == 0) {
alog("Unable to clean table 'anope_hs_core' - HostServ RDB save failed.");
return;
}
rdb_close();
#endif
+4 -1
View File
@@ -1406,7 +1406,10 @@ int db_mysql_load_cs_dbase(void)
/* Name, founder, successor, password */
snprintf(ci->name, CHANMAX, "%s", mysql_row[0]);
ci->founder = findcore(mysql_row[1]);
ci->successor = findcore(mysql_row[2]);
if (mysql_row[2] && *(mysql_row[2]))
ci->successor = findcore(mysql_row[2]);
else
ci->successor = NULL;
snprintf(ci->founderpass, PASSMAX, "%s", mysql_row[3]);
/* Description, URL, email -- scalloc() initializes to 0/NULL */
+12 -3
View File
@@ -241,14 +241,23 @@ void save_rdb_news()
if (!rdb_open())
return;
rdb_tag_table("anope_os_news");
if (rdb_tag_table("anope_os_news") == 0) {
alog("Unable to tag table 'anope_os_news' - News RDB save failed.");
return;
}
for (i = 0; i < nnews; i++) {
ni = &news[i];
rdb_save_news(ni);
if (rdb_save_news(ni) == 0) {
alog("Unable to save NewsItem %d - News RDB save failed.", ni->num);
return;
}
}
rdb_clean_table("anope_os_news");
if (rdb_clean_table("anope_os_news") == 0) {
alog("Unable to clean table 'anope_os_news' - News RDB save failed.");
return;
}
rdb_close();
#endif
+69 -26
View File
@@ -844,29 +844,57 @@ void save_ns_rdb_dbase(void)
if (!rdb_open())
return;
rdb_tag_table("anope_ns_core");
rdb_tag_table("anope_ns_alias");
rdb_tag_table("anope_ns_access");
rdb_tag_table_where("anope_ms_info", "serv='NICK'");
if (rdb_tag_table("anope_ns_core") == 0) {
alog("Unable to tag 'anope_ns_core' - NickServ RDB save failed.");
return;
}
if (rdb_tag_table("anope_ns_alias") == 0) {
alog("Unable to tag 'anope_ns_alias' - NickServ RDB save failed.");
return;
}
if (rdb_tag_table("anope_ns_access") == 0) {
alog("Unable to tag 'anope_ns_access' - NickServ RDB save failed.");
return;
}
if (rdb_tag_table_where("anope_ms_info", "serv='NICK'") == 0) {
alog("Unable to tag 'anope_ms_info' - NickServ RDB save failed.");
return;
}
for (i = 0; i < 1024; i++) {
for (nc = nclists[i]; nc; nc = nc->next) {
rdb_save_ns_core(nc);
if (rdb_save_ns_core(nc) == 0) {
alog("Unable to save NickCore for '%s' - NickServ RDB save failed.", nc->display);
return;
}
} /* for (nc) */
} /* for (i) */
for (i = 0; i < 1024; i++) {
for (na = nalists[i]; na; na = na->next) {
rdb_save_ns_alias(na);
if (rdb_save_ns_alias(na) == 0) {
alog("Unable to save NickAlias for '%s' - NickServ RDB save failed.", na->nick);
return;
}
} /* for (na) */
} /* for (i) */
rdb_clean_table("anope_ns_core");
rdb_clean_table("anope_ns_alias");
rdb_clean_table("anope_ns_access");
rdb_clean_table_where("anope_ms_info", "serv='NICK'");
if (rdb_clean_table("anope_ns_core") == 0) {
alog("Unable to clean table 'anope_ns_core' - NickServ RDB save failed.");
return;
}
if (rdb_clean_table("anope_ns_alias") == 0) {
alog("Unable to clean table 'anope_ns_alias' - NickServ RDB save failed.");
return;
}
if (rdb_clean_table("anope_ns_access") == 0) {
alog("Unable to clean table 'anope_ns_access' - NickServ RDB save failed.");
return;
}
if (rdb_clean_table_where("anope_ms_info", "serv='NICK'") == 0) {
alog("Unable to clean table 'anope_ms_info' - NickServ RDB save failed.");
return;
}
rdb_close();
#endif
@@ -881,19 +909,25 @@ void save_ns_req_rdb_dbase(void)
if (!rdb_open())
return;
rdb_tag_table("anope_ns_request");
if (rdb_tag_table("anope_ns_request") == 0) {
alog("Unable to tag table 'anope_ns_request' - NickServ Request RDB save failed.");
return;
}
for (i = 0; i < 1024; i++) {
for (nr = nrlists[i]; nr; nr = nr->next) {
if (!rdb_save_ns_req(nr)) {
if (rdb_save_ns_req(nr) == 0) {
/* Something went wrong - abort saving */
alog("Unable to save NickRequest (nick '%s')", nr->nick);
alog("Unable to save NickRequest (nick '%s') - NickServ Request RDB save failed.", nr->nick);
return;
}
}
}
rdb_clean_table("anope_ns_request");
if (rdb_clean_table("anope_ns_request") == 0) {
alog("Unable to clean table 'anope_ns_request' - NickServ Request RDB save failed.");
return;
}
rdb_close();
#endif
@@ -1346,7 +1380,9 @@ void change_core_display(NickCore * nc, char *newdisplay)
* on the next /OS UPDATE might need it on /NS DROP too...
*/
if (rdb_open()) {
rdb_ns_set_display(newdisplay, nc->display);
if (rdb_ns_set_display(newdisplay, nc->display) == 0) {
alog("Unable to update display for %s - Nick Display RDB update failed.", nc->display);
}
rdb_close();
}
#endif
@@ -1399,14 +1435,20 @@ static int delcore(NickCore * nc)
if (rdb_open()) {
q_display = rdb_quote(nc->display);
snprintf(clause, sizeof(clause), "display='%s'", q_display);
rdb_scrub_table("anope_ns_access", clause);
rdb_scrub_table("anope_ns_core", clause);
rdb_scrub_table("anope_cs_access", clause);
/* I'm unsure how to clean up the OS ADMIN/OPER list on the db */
/* I wish the "display" primary key would be the same on all tables */
snprintf(clause, sizeof(clause), "receiver='%s' AND serv='NICK'",
q_display);
rdb_scrub_table("anope_ms_info", clause);
if (rdb_scrub_table("anope_ns_access", clause) == 0)
alog("Unable to scrub table 'anope_ns_access' - RDB update failed.");
else if (rdb_scrub_table("anope_ns_core", clause) == 0)
alog("Unable to scrub table 'anope_ns_core' - RDB update failed.");
else if (rdb_scrub_table("anope_cs_access", clause) == 0)
alog("Unable to scrub table 'anope_cs_access' - RDB update failed.");
else {
/* I'm unsure how to clean up the OS ADMIN/OPER list on the db */
/* I wish the "display" primary key would be the same on all tables */
snprintf(clause, sizeof(clause),
"receiver='%s' AND serv='NICK'", q_display);
if (rdb_scrub_table("anope_ms_info", clause) == 0)
alog("Unable to scrub table 'anope_ms_info' - RDB update failed.");
}
rdb_close();
free(q_display);
}
@@ -1528,7 +1570,8 @@ int delnick(NickAlias * na)
if (rdb_open()) {
q_nick = rdb_quote(na->nick);
snprintf(clause, sizeof(clause), "nick='%s'", q_nick);
rdb_scrub_table("anope_ns_alias", clause);
if (rdb_scrub_table("anope_ns_alias", clause) == 0)
alog("Unable to scrub table 'anope_ns_alias' - RDB update failed");
rdb_close();
free(q_nick);
}
+42 -11
View File
@@ -505,20 +505,51 @@ void save_os_rdb_dbase(void)
if (!rdb_open())
return;
rdb_tag_table("anope_os_akills");
rdb_tag_table("anope_os_sglines");
rdb_tag_table("anope_os_sqlines");
rdb_tag_table("anope_os_szlines");
if (rdb_tag_table("anope_os_akills") == 0) {
alog("Unable to tag table 'anope_os_akills' - OperServ RDB save failed.");
return;
}
if (rdb_tag_table("anope_os_sglines") == 0) {
alog("Unable to tag table 'anope_os_sglines' - OperServ RDB save failed.");
return;
}
if (rdb_tag_table("anope_os_sqlines") == 0) {
alog("Unable to tag table 'anope_os_sqlines' - OperServ RDB save failed.");
return;
}
if (rdb_tag_table("anope_os_szlines") == 0) {
alog("Unable to tag table 'anope_os_szlines' - OperServ RDB save failed.");
return;
}
/* We empty anope_os_core as required */
rdb_empty_table("anope_os_core");
if (rdb_empty_table("anope_os_core") == 0) {
alog("Unable to empty table 'anope_os_core' - OperServ RDB save failed");
return;
}
rdb_save_os_db(maxusercnt, maxusertime, &akills, &sglines, &sqlines,
&szlines);
if (rdb_save_os_db
(maxusercnt, maxusertime, &akills, &sglines, &sqlines,
&szlines) == 0) {
alog("Unable to save OperServ data - OperServ RDB save failed");
return;
}
rdb_clean_table("anope_os_akills");
rdb_clean_table("anope_os_sglines");
rdb_clean_table("anope_os_sqlines");
rdb_clean_table("anope_os_szlines");
if (rdb_clean_table("anope_os_akills") == 0) {
alog("Unable to clean table 'anope_os_akills' - OperServ RDB save failed.");
return;
}
if (rdb_clean_table("anope_os_sglines") == 0) {
alog("Unable to clean table 'anope_os_sglines' - OperServ RDB save failed.");
return;
}
if (rdb_clean_table("anope_os_sqlines") == 0) {
alog("Unable to clean table 'anope_os_sqlines' - OperServ RDB save failed.");
return;
}
if (rdb_clean_table("anope_os_szlines") == 0) {
alog("Unable to clean table 'anope_os_szlines' - OperServ RDB save failed.");
return;
}
rdb_close();
#endif
+12 -3
View File
@@ -467,12 +467,21 @@ void save_rdb_exceptions()
if (!rdb_open())
return;
rdb_tag_table("anope_os_exceptions");
if (rdb_tag_table("anope_os_exceptions") == 0) {
alog("Unable to tag table 'anope_os_exceptions' - Exception RDB save failed.");
return;
}
for (i = 0; i < nexceptions; i++) {
e = &exceptions[i];
rdb_save_exceptions(e);
if (rdb_save_exceptions(e) == 0) {
alog("Unable to save Exception '%s' - Exception RDB save failed.", e->mask);
return;
}
}
if (rdb_clean_table("anope_os_exceptions") == 0) {
alog("Unable to clean table 'anope_os_exceptions' - Exception RDB save failed.");
return;
}
rdb_clean_table("anope_os_exceptions");
rdb_close();
#endif
}
+2 -3
View File
@@ -651,9 +651,8 @@ User *do_nick(const char *source, char *nick, char *username, char *host,
/* An old user changing nicks. */
if (UseTS6)
user = find_byuid(source);
if (!user) {
user = finduser(source);
} else
if (!user)
user = finduser(source);
if (!user) {
+5 -1
View File
@@ -9,10 +9,14 @@ VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="17"
VERSION_EXTRA="-svn"
VERSION_BUILD="1209"
VERSION_BUILD="1210"
# $Log$
#
# BUILD : 1.7.17 (1210)
# BUGS : 645 646 647
# NOTES : Fixed anoperc restart, nickchanges on TS6, typo in CHAN_REGISTER_NONE_CHANNEL; added error messages when RDB functions fail (thx heinz)
#
# BUILD : 1.7.17 (1209)
# BUGS :
# NOTES : Another batch of changes regarding RDB/MySQL; all functions are now doing proper error reporting; errors are not yet handled properly