Jump to content

Error/warning when using .account onlinelist


Guest Darkruler

Recommended Posts

Error when using .account onlinelist

it will popup that the column "realm" doesn't exist in the realmd.account table

problem is in

QueryResult *result = loginDatabase.PQuery("SELECT id, username, last_ip, gmlevel, expansion FROM account WHERE [color="Red"]realm[/color] = %u", realmID);

which is line 486 of http://github.com/mangos/mangos/blob/master/src/mangosd/CliRunnable.cpp

Link to comment
Share on other sites

Because it should be active_realm_id instead of realm. The following should fix it.

diff --git a/src/mangosd/CliRunnable.cpp b/src/mangosd/CliRunnable.cpp
index 1f11037..549d578 100644
--- a/src/mangosd/CliRunnable.cpp
+++ b/src/mangosd/CliRunnable.cpp
@@ -483,7 +483,7 @@ bool ChatHandler::HandleAccountOnlineListCommand(const char* args)

    ///- Get the list of accounts ID logged to the realm
    //                                                 0   1         2        3        4
-    QueryResult *result = loginDatabase.PQuery("SELECT id, username, last_ip, gmlevel, expansion FROM account WHERE realm = %u", realmID);
+    QueryResult *result = loginDatabase.PQuery("SELECT id, username, last_ip, gmlevel, expansion FROM account WHERE active_realm_id = %u", realmID);

    return ShowAccountListHelper(result,&limit);
}

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use