From 60548aa00beee50b20bc0742d1dafc3a69c6fb20 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 29 May 2011 19:05:28 -0400 Subject: [PATCH] Fixed ns_update and db_mysql_live sql queries --- modules/core/db_mysql_live.cpp | 12 ++++++------ modules/core/ns_main.cpp | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/core/db_mysql_live.cpp b/modules/core/db_mysql_live.cpp index 1073f1b99..a9abd2868 100644 --- a/modules/core/db_mysql_live.cpp +++ b/modules/core/db_mysql_live.cpp @@ -179,8 +179,8 @@ class MySQLLiveModule : public Module try { - SQLQuery query("SELECT * FROM `anope_cs_info` WHERE `name` = ?"); - query.setValue(1, chname); + SQLQuery query("SELECT * FROM `anope_cs_info` WHERE `name` = @name"); + query.setValue("name", chname); CommandMutex *current_command = this->CurrentCommand(); if (current_command) { @@ -216,8 +216,8 @@ class MySQLLiveModule : public Module try { - SQLQuery query("SELECT * FROM `anope_ns_alias` WHERE `nick` = ?"); - query.setValue(1, nick); + SQLQuery query("SELECT * FROM `anope_ns_alias` WHERE `nick` = @nick"); + query.setValue("nick", nick); CommandMutex *current_command = this->CurrentCommand(); if (current_command) { @@ -253,8 +253,8 @@ class MySQLLiveModule : public Module try { - SQLQuery query("SELECT * FROM `anope_ns_core` WHERE `display` = ?"); - query.setValue(1, nick); + SQLQuery query("SELECT * FROM `anope_ns_core` WHERE `display` = @display"); + query.setValue("display", nick); CommandMutex *current_command = this->CurrentCommand(); if (current_command) { diff --git a/modules/core/ns_main.cpp b/modules/core/ns_main.cpp index 25960e023..8d50f7042 100644 --- a/modules/core/ns_main.cpp +++ b/modules/core/ns_main.cpp @@ -147,7 +147,7 @@ class NickServCore : public Module this->SetAuthor("Anope"); Implementation i[] = { I_OnDelNick, I_OnDelCore, I_OnChangeCoreDisplay, I_OnNickIdentify, I_OnNickGroup, I_OnNickUpdate }; - ModuleManager::Attach(i, this, 5); + ModuleManager::Attach(i, this, 6); ModuleManager::RegisterService(&this->mynickserv);