diff options
author | Naram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-10-05 21:39:38 +0000 |
---|---|---|
committer | Naram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-10-05 21:39:38 +0000 |
commit | eda321aa90bfb714013fc2651c671f2415b5280a (patch) | |
tree | ec4c84789045db21301c7d6e7493d38f2be7f0ad /src | |
parent | 4e11583205327ce9d65c744473baff28d54979b3 (diff) |
Merge branch 'anopeng' into anopeng-config
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1425 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r-- | src/rdb.c | 12 | ||||
-rw-r--r-- | src/send.c | 2 |
2 files changed, 7 insertions, 7 deletions
@@ -73,7 +73,7 @@ char *rdb_quote(char *str) * update, all rows with active still 0 will be deleted; this is done to * easily delete old entries from the database. */ -int rdb_tag_table(char *table) +int rdb_tag_table(const char* table) { #ifdef USE_MYSQL return db_mysql_try("UPDATE %s SET active = 0", table); @@ -84,7 +84,7 @@ int rdb_tag_table(char *table) } /* Be sure to quote all user input in the clause! */ -int rdb_tag_table_where(char *table, char *clause) +int rdb_tag_table_where(const char* table, const char* clause) { #ifdef USE_MYSQL return db_mysql_try("UPDATE %s SET active = 0 WHERE %s", table, @@ -98,7 +98,7 @@ int rdb_tag_table_where(char *table, char *clause) /*************************************************************************/ /* Empty an entire database table */ -int rdb_empty_table(char *table) +int rdb_empty_table(const char* table) { #ifdef USE_MYSQL return db_mysql_try("TRUNCATE TABLE %s", table); @@ -111,7 +111,7 @@ int rdb_empty_table(char *table) /*************************************************************************/ /* Clean up a table with 'dirty' records (active = 0) */ -int rdb_clean_table(char *table) +int rdb_clean_table(const char* table) { #ifdef USE_MYSQL return db_mysql_try("DELETE FROM %s WHERE active = 0", table); @@ -121,7 +121,7 @@ int rdb_clean_table(char *table) } /* Be sure to quote user input in the clause! */ -int rdb_clean_table_where(char *table, char *clause) +int rdb_clean_table_where(const char* table, const char* clause) { #ifdef USE_MYSQL return db_mysql_try("DELETE FROM %s WHERE active = 0 AND (%s)", table, @@ -136,7 +136,7 @@ int rdb_clean_table_where(char *table, char *clause) /* Delete specific records from a table. The clause is MySQL syntax, and * should be all quoted up nicely in the calling code. */ -int rdb_scrub_table(char *table, char *clause) +int rdb_scrub_table(const char* table, const char* clause) { #ifdef USE_MYSQL return db_mysql_try("DELETE FROM %s WHERE %s", table, clause); diff --git a/src/send.c b/src/send.c index 446020f35..0d4c6d4e9 100644 --- a/src/send.c +++ b/src/send.c @@ -67,7 +67,7 @@ void send_cmd(const std::string &source, const char *fmt, ...) if (!source.empty()) { sockprintf(servsock, ":%s %s\r\n", source.c_str(), buf); - eventprintf(":%s %s", source, buf); + eventprintf(":%s %s", source.c_str(), buf); if (debug) alog("debug: Sent: :%s %s", source.c_str(), buf); } |