summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-10-25 04:30:22 -0400
committerAdam <Adam@anope.org>2012-10-25 04:30:22 -0400
commite5efe42ecbb1b84837af5f76f09b7c8ab9d4248d (patch)
tree1c3e04af2c16e2f261b68dd491b72c97a27367e7
parent10e21bfedaa5aea8a3b3565b596de2dd25230f53 (diff)
Fixed showing users from the right server on unreal/bahamut
-rw-r--r--modules/protocol/bahamut.cpp9
-rw-r--r--modules/protocol/unreal.cpp9
2 files changed, 16 insertions, 2 deletions
diff --git a/modules/protocol/bahamut.cpp b/modules/protocol/bahamut.cpp
index d4d7b7703..181b4dc2e 100644
--- a/modules/protocol/bahamut.cpp
+++ b/modules/protocol/bahamut.cpp
@@ -381,7 +381,14 @@ struct IRCDMessageNick : IRCDMessage
{
if (params.size() == 10)
{
- User *user = new User(params[0], params[4], params[5], "", params[8], source.GetServer(), params[9], params[2].is_pos_number_only() ? convertTo<time_t>(params[2]) : 0, params[3]);
+ Server *s = Server::Find(params[6]);
+ if (s == NULL)
+ {
+ Log(LOG_DEBUG) << "User " << params[0] << " introduced from nonexistant server " << params[6] << "?";
+ return true;
+ }
+
+ User *user = new User(params[0], params[4], params[5], "", params[8], s, params[9], params[2].is_pos_number_only() ? convertTo<time_t>(params[2]) : 0, params[3]);
if (user && nickserv)
{
const NickAlias *na;
diff --git a/modules/protocol/unreal.cpp b/modules/protocol/unreal.cpp
index 25f030535..c22bf42b1 100644
--- a/modules/protocol/unreal.cpp
+++ b/modules/protocol/unreal.cpp
@@ -790,8 +790,15 @@ struct IRCDMessageNick : IRCDMessage
vhost.clear();
time_t user_ts = params[2].is_pos_number_only() ? convertTo<time_t>(params[2]) : Anope::CurTime;
+
+ Server *s = Server::Find(params[5]);
+ if (s == NULL)
+ {
+ Log(LOG_DEBUG) << "User " << params[0] << " introduced from nonexistant server " << params[5] << "?";
+ return true;
+ }
- User *user = new User(params[0], params[3], params[4], vhost, ip, source.GetServer(), params[10], user_ts, params[7]);
+ User *user = new User(params[0], params[3], params[4], vhost, ip, s, params[10], user_ts, params[7]);
const NickAlias *na = NULL;