diff options
author | Adam <Adam@anope.org> | 2011-04-23 02:36:42 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-04-23 02:36:42 -0400 |
commit | 5e027c196d5ebef91d5ecf5bd7604a9fb115ccaa (patch) | |
tree | 849f8076b2e7c1f459006207e5876dd4396687eb | |
parent | 3aeaef5b9aa104a1a2d9045e54c581affe15132e (diff) |
Two small SQL fixes
-rw-r--r-- | modules/extra/db_mysql.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/extra/db_mysql.cpp b/modules/extra/db_mysql.cpp index a6f83899e..650763b6b 100644 --- a/modules/extra/db_mysql.cpp +++ b/modules/extra/db_mysql.cpp @@ -687,7 +687,7 @@ class DBMySQL : public Module } else if (cmd.equals_ci("KILL") || cmd.equals_ci("SECURE") || cmd.equals_ci("PRIVATE") || cmd.equals_ci("MSG") || cmd.equals_ci("HIDE") || cmd.equals_ci("AUTOOP")) { - this->RunQuery("UPDATE `anope_ns_core` SET `flags` = '" + ToString(CurBot->ToString()) + "' WHERE `display` = '" + this->Escape(nc->display) + "'"); + this->RunQuery("UPDATE `anope_ns_core` SET `flags` = '" + ToString(nc->ToString()) + "' WHERE `display` = '" + this->Escape(nc->display) + "'"); } } } @@ -1133,7 +1133,7 @@ class DBMySQL : public Module void OnSetVhost(NickAlias *na) { - this->RunQuery("INSERT INTO `anope_hs_core` (nick, vident, vhost, creator, time) VALUES('" + na->nick + "', '" + na->hostinfo.GetIdent() + "', '" + na->hostinfo.GetHost() + "', '" + na->hostinfo.GetCreator() + "', " + stringify(na->hostinfo.GetTime()) + ")"); + this->RunQuery("INSERT INTO `anope_hs_core` (nick, vident, vhost, creator, time) VALUES('" + this->Escape(na->nick) + "', '" + this->Escape(na->hostinfo.GetIdent()) + "', '" + this->Escape(na->hostinfo.GetHost()) + "', '" + this->Escape(na->hostinfo.GetCreator()) + "', " + stringify(na->hostinfo.GetTime()) + ")"); } }; |