diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_alias.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_callerid.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_cgiirc.cpp | 25 | ||||
-rw-r--r-- | src/modules/m_check.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_chghost.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_clearchan.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_cloaking.cpp | 8 | ||||
-rw-r--r-- | src/modules/m_customtitle.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_dccallow.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_hideoper.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_hostcycle.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_httpd_stats.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_ircv3_chghost.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_ldapoper.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_messageflood.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_repeat.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_rline.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_sasl.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_sethost.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_showwhois.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree/opertype.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree/uid.cpp | 8 | ||||
-rw-r--r-- | src/modules/m_sqloper.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_watch.cpp | 8 |
24 files changed, 47 insertions, 50 deletions
diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp index 95667e7ed..bdb242938 100644 --- a/src/modules/m_alias.cpp +++ b/src/modules/m_alias.cpp @@ -296,7 +296,7 @@ class ModuleAlias : public Module } else if (!newline.compare(i, 5, "$host", 5)) { - result.append(user->host); + result.append(user->GetRealHost()); i += 4; } else if (!newline.compare(i, 5, "$chan", 5)) @@ -312,7 +312,7 @@ class ModuleAlias : public Module } else if (!newline.compare(i, 6, "$vhost", 6)) { - result.append(user->dhost); + result.append(user->GetDisplayedHost()); i += 5; } else if (!newline.compare(i, 12, "$requirement", 12)) diff --git a/src/modules/m_callerid.cpp b/src/modules/m_callerid.cpp index a00da6a6f..d191a9fc7 100644 --- a/src/modules/m_callerid.cpp +++ b/src/modules/m_callerid.cpp @@ -399,7 +399,7 @@ public: if (now > (dat->lastnotify + (time_t)notify_cooldown)) { user->WriteNumeric(RPL_TARGNOTIFY, dest->nick, "has been informed that you messaged them."); - dest->WriteRemoteNumeric(RPL_UMODEGMSG, user->nick, InspIRCd::Format("%s@%s", user->ident.c_str(), user->dhost.c_str()), InspIRCd::Format("is messaging you, and you have umode +g. Use /ACCEPT +%s to allow.", + dest->WriteRemoteNumeric(RPL_UMODEGMSG, user->nick, InspIRCd::Format("%s@%s", user->ident.c_str(), user->GetDisplayedHost().c_str()), InspIRCd::Format("is messaging you, and you have umode +g. Use /ACCEPT +%s to allow.", user->nick.c_str())); dat->lastnotify = now; } diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp index 21098d7a7..2b80f6e5c 100644 --- a/src/modules/m_cgiirc.cpp +++ b/src/modules/m_cgiirc.cpp @@ -70,7 +70,7 @@ class WebIRCHost return false; // Does the user's hostname match our hostmask? - if (InspIRCd::Match(user->host, hostmask, ascii_case_insensitive_map)) + if (InspIRCd::Match(user->GetRealHost(), hostmask, ascii_case_insensitive_map)) return true; // Does the user's IP address match our hostmask? @@ -134,17 +134,16 @@ class CommandWebIRC : public SplitCommand // The user matched a WebIRC block! gateway.set(user, parameters[1]); - realhost.set(user, user->host); + realhost.set(user, user->GetRealHost()); realip.set(user, user->GetIPString()); if (notify) ServerInstance->SNO->WriteGlobalSno('w', "Connecting user %s is using a WebIRC gateway; changing their IP/host from %s/%s to %s/%s.", - user->nick.c_str(), user->GetIPString().c_str(), user->host.c_str(), parameters[3].c_str(), newhost.c_str()); + user->nick.c_str(), user->GetIPString().c_str(), user->GetRealHost().c_str(), parameters[3].c_str(), newhost.c_str()); // Set the IP address and hostname sent via WEBIRC. ChangeIP(user, parameters[3]); - user->host = user->dhost = newhost; - user->InvalidateCache(); + user->ChangeRealHost(newhost, true); return CMD_SUCCESS; } @@ -186,10 +185,9 @@ class CGIResolver : public DNS::Request return; if (notify) - ServerInstance->SNO->WriteGlobalSno('w', "Connecting user %s detected as using CGI:IRC (%s), changing real host to %s", them->nick.c_str(), them->host.c_str(), ans_record.rdata.c_str()); + ServerInstance->SNO->WriteGlobalSno('w', "Connecting user %s detected as using CGI:IRC (%s), changing real host to %s", them->nick.c_str(), them->GetRealHost().c_str(), ans_record.rdata.c_str()); - them->host = them->dhost = ans_record.rdata; - them->InvalidateCache(); + them->ChangeRealHost(ans_record.rdata, true); lu->CheckLines(true); } } @@ -202,7 +200,7 @@ class CGIResolver : public DNS::Request User* them = ServerInstance->FindUUID(theiruid); if ((them) && (!them->quitting)) { - ServerInstance->SNO->WriteToSnoMask('w', "Connecting user %s detected as using CGI:IRC (%s), but their host can't be resolved!", them->nick.c_str(), them->host.c_str()); + ServerInstance->SNO->WriteToSnoMask('w', "Connecting user %s detected as using CGI:IRC (%s), but their host can't be resolved!", them->nick.c_str(), them->GetRealHost().c_str()); } } @@ -233,11 +231,10 @@ class ModuleCgiIRC : public Module, public Whois::EventListener void HandleIdent(LocalUser* user, const std::string& newip) { - cmd.realhost.set(user, user->host); + cmd.realhost.set(user, user->GetRealHost()); cmd.realip.set(user, user->GetIPString()); ChangeIP(user, newip); - user->host = user->dhost = user->GetIPString(); - user->InvalidateCache(); + user->ChangeRealHost(user->GetIPString(), true); RecheckClass(user); // Don't create the resolver if the core couldn't put the user in a connect class or when dns is disabled @@ -257,7 +254,7 @@ class ModuleCgiIRC : public Module, public Whois::EventListener waiting.set(user, count - 1); delete r; if (cmd.notify) - ServerInstance->SNO->WriteToSnoMask('w', "Connecting user %s detected as using CGI:IRC (%s), but I could not resolve their hostname; %s", user->nick.c_str(), user->host.c_str(), ex.GetReason().c_str()); + ServerInstance->SNO->WriteToSnoMask('w', "Connecting user %s detected as using CGI:IRC (%s), but I could not resolve their hostname; %s", user->nick.c_str(), user->GetRealHost().c_str(), ex.GetReason().c_str()); } } @@ -364,7 +361,7 @@ public: { for (std::vector<std::string>::const_iterator iter = hosts.begin(); iter != hosts.end(); ++iter) { - if (!InspIRCd::Match(user->host, *iter, ascii_case_insensitive_map) && !InspIRCd::MatchCIDR(user->GetIPString(), *iter, ascii_case_insensitive_map)) + if (!InspIRCd::Match(user->GetRealHost(), *iter, ascii_case_insensitive_map) && !InspIRCd::MatchCIDR(user->GetIPString(), *iter, ascii_case_insensitive_map)) continue; CheckIdent(user); // Nothing on failure. diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp index 2cb45ad43..b442dea9c 100644 --- a/src/modules/m_check.cpp +++ b/src/modules/m_check.cpp @@ -265,7 +265,7 @@ class CommandCheck : public Command const UserManager::CloneCounts& clonecount = ServerInstance->Users->GetCloneCounts(i->first); context.Write("member", InspIRCd::Format("%-3u %s%s (%s@%s) %s ", clonecount.global, i->second->GetAllPrefixChars().c_str(), i->first->nick.c_str(), - i->first->ident.c_str(), i->first->dhost.c_str(), i->first->fullname.c_str())); + i->first->ident.c_str(), i->first->GetDisplayedHost().c_str(), i->first->fullname.c_str())); } const ModeParser::ListModeList& listmodes = ServerInstance->Modes->GetListModes(); @@ -283,7 +283,7 @@ class CommandCheck : public Command const user_hash& users = ServerInstance->Users->GetUsers(); for (user_hash::const_iterator a = users.begin(); a != users.end(); ++a) { - if (InspIRCd::Match(a->second->host, parameters[0], ascii_case_insensitive_map) || InspIRCd::Match(a->second->dhost, parameters[0], ascii_case_insensitive_map)) + if (InspIRCd::Match(a->second->GetRealHost(), parameters[0], ascii_case_insensitive_map) || InspIRCd::Match(a->second->GetDisplayedHost(), parameters[0], ascii_case_insensitive_map)) { /* host or vhost matches mask */ context.Write("match", ConvToStr(++x) + " " + a->second->GetFullRealHost() + " " + a->second->GetIPString() + " " + a->second->fullname); diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp index ad8353cbd..8b588b63d 100644 --- a/src/modules/m_chghost.cpp +++ b/src/modules/m_chghost.cpp @@ -66,7 +66,7 @@ class CommandChghost : public Command if ((dest->ChangeDisplayedHost(parameters[1])) && (!user->server->IsULine())) { // fix by brain - ulines set hosts silently - ServerInstance->SNO->WriteGlobalSno('a', user->nick+" used CHGHOST to make the displayed host of "+dest->nick+" become "+dest->dhost); + ServerInstance->SNO->WriteGlobalSno('a', user->nick+" used CHGHOST to make the displayed host of "+dest->nick+" become "+dest->GetDisplayedHost()); } } diff --git a/src/modules/m_clearchan.cpp b/src/modules/m_clearchan.cpp index 1b4b8724a..08a7a88b5 100644 --- a/src/modules/m_clearchan.cpp +++ b/src/modules/m_clearchan.cpp @@ -116,7 +116,7 @@ class CommandClearChan : public Command XLine* xline; try { - mask = ((method[0] == 'Z') ? curr->GetIPString() : "*@" + curr->host); + mask = ((method[0] == 'Z') ? curr->GetIPString() : "*@" + curr->GetRealHost()); xline = xlf->Generate(ServerInstance->Time(), 60*60, user->nick, reason, mask); } catch (ModuleException&) diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index 7e9c78b31..f9a7fa380 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -90,7 +90,7 @@ class CloakUser : public ModeHandler if (adding) { // assume this is more correct - if (user->registered != REG_ALL && user->host != user->dhost) + if (user->registered != REG_ALL && user->GetRealHost() != user->GetDisplayedHost()) return MODEACTION_DENY; std::string* cloak = ext.get(user); @@ -116,7 +116,7 @@ class CloakUser : public ModeHandler * and make it match the displayed one. */ user->SetMode(this, false); - user->ChangeDisplayedHost(user->host.c_str()); + user->ChangeDisplayedHost(user->GetRealHost().c_str()); return MODEACTION_ALLOW; } } @@ -281,7 +281,7 @@ class ModuleCloaking : public Module OnUserConnect(lu); std::string* cloak = cu.ext.get(user); /* Check if they have a cloaked host, but are not using it */ - if (cloak && *cloak != user->dhost) + if (cloak && *cloak != user->GetDisplayedHost()) { const std::string cloakMask = user->nick + "!" + user->ident + "@" + *cloak; if (InspIRCd::Match(cloakMask, mask)) @@ -384,7 +384,7 @@ class ModuleCloaking : public Module if (cloak) return; - cu.ext.set(dest, GenCloak(dest->client_sa, dest->GetIPString(), dest->host)); + cu.ext.set(dest, GenCloak(dest->client_sa, dest->GetIPString(), dest->GetRealHost())); } }; diff --git a/src/modules/m_customtitle.cpp b/src/modules/m_customtitle.cpp index 30c0aa4f2..2a08592ea 100644 --- a/src/modules/m_customtitle.cpp +++ b/src/modules/m_customtitle.cpp @@ -35,7 +35,7 @@ class CommandTitle : public Command CmdResult Handle(const std::vector<std::string> ¶meters, User* user) { - const std::string userHost = user->ident + "@" + user->host; + const std::string userHost = user->ident + "@" + user->GetRealHost(); const std::string userIP = user->ident + "@" + user->GetIPString(); ConfigTagList tags = ServerInstance->Config->ConfTags("title"); diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp index edf9d012f..e687e1341 100644 --- a/src/modules/m_dccallow.cpp +++ b/src/modules/m_dccallow.cpp @@ -181,7 +181,7 @@ class CommandDccallow : public Command } } - std::string mask = target->nick+"!"+target->ident+"@"+target->dhost; + std::string mask = target->nick+"!"+target->ident+"@"+target->GetDisplayedHost(); std::string default_length = ServerInstance->Config->ConfValue("dccallow")->getString("length"); unsigned long length; @@ -382,14 +382,14 @@ class ModuleDCCAllow : public Module return MOD_RES_PASSTHRU; user->WriteNotice("The user " + u->nick + " is not accepting DCC SENDs from you. Your file " + filename + " was not sent."); - u->WriteNotice(user->nick + " (" + user->ident + "@" + user->dhost + ") attempted to send you a file named " + filename + ", which was blocked."); + u->WriteNotice(user->nick + " (" + user->ident + "@" + user->GetDisplayedHost() + ") attempted to send you a file named " + filename + ", which was blocked."); u->WriteNotice("If you trust " + user->nick + " and were expecting this, you can type /DCCALLOW HELP for information on the DCCALLOW system."); return MOD_RES_DENY; } else if ((blockchat) && (stdalgo::string::equalsci(type, "CHAT"))) { user->WriteNotice("The user " + u->nick + " is not accepting DCC CHAT requests from you."); - u->WriteNotice(user->nick + " (" + user->ident + "@" + user->dhost + ") attempted to initiate a DCC CHAT session, which was blocked."); + u->WriteNotice(user->nick + " (" + user->ident + "@" + user->GetDisplayedHost() + ") attempted to initiate a DCC CHAT session, which was blocked."); u->WriteNotice("If you trust " + user->nick + " and were expecting this, you can type /DCCALLOW HELP for information on the DCCALLOW system."); return MOD_RES_DENY; } diff --git a/src/modules/m_hideoper.cpp b/src/modules/m_hideoper.cpp index ff9e78ca2..6650b7f16 100644 --- a/src/modules/m_hideoper.cpp +++ b/src/modules/m_hideoper.cpp @@ -138,7 +138,7 @@ class ModuleHideOper : public Module, public Whois::LineEventListener if (!oper->server->IsULine() && (stats.GetSource()->IsOper() || !oper->IsModeSet(hm))) { LocalUser* lu = IS_LOCAL(oper); - stats.AddRow(249, oper->nick + " (" + oper->ident + "@" + oper->dhost + ") Idle: " + + stats.AddRow(249, oper->nick + " (" + oper->ident + "@" + oper->GetDisplayedHost() + ") Idle: " + (lu ? ConvToStr(ServerInstance->Time() - lu->idle_lastmsg) + " secs" : "unavailable")); count++; } diff --git a/src/modules/m_hostcycle.cpp b/src/modules/m_hostcycle.cpp index 621f06a27..0f7405dcc 100644 --- a/src/modules/m_hostcycle.cpp +++ b/src/modules/m_hostcycle.cpp @@ -109,7 +109,7 @@ class ModuleHostCycle : public Module void OnChangeIdent(User* user, const std::string& newident) CXX11_OVERRIDE { - DoHostCycle(user, newident, user->dhost, "Changing ident"); + DoHostCycle(user, newident, user->GetDisplayedHost(), "Changing ident"); } void OnChangeHost(User* user, const std::string& newhost) CXX11_OVERRIDE diff --git a/src/modules/m_httpd_stats.cpp b/src/modules/m_httpd_stats.cpp index de5a61e4d..00cab3197 100644 --- a/src/modules/m_httpd_stats.cpp +++ b/src/modules/m_httpd_stats.cpp @@ -183,7 +183,7 @@ class ModuleHttpStats : public Module, public HTTPRequestEventListener data << "<user>"; data << "<nickname>" << u->nick << "</nickname><uuid>" << u->uuid << "</uuid><realhost>" - << u->host << "</realhost><displayhost>" << u->dhost << "</displayhost><gecos>" + << u->GetRealHost() << "</realhost><displayhost>" << u->GetDisplayedHost() << "</displayhost><gecos>" << Sanitize(u->fullname) << "</gecos><server>" << u->server->GetName() << "</server>"; if (u->IsAway()) data << "<away>" << Sanitize(u->awaymsg) << "</away><awaytime>" << u->awaytime << "</awaytime>"; diff --git a/src/modules/m_ircv3_chghost.cpp b/src/modules/m_ircv3_chghost.cpp index af3503108..0a9e055b4 100644 --- a/src/modules/m_ircv3_chghost.cpp +++ b/src/modules/m_ircv3_chghost.cpp @@ -40,7 +40,7 @@ class ModuleIRCv3ChgHost : public Module void OnChangeIdent(User* user, const std::string& newident) CXX11_OVERRIDE { - DoChgHost(user, newident, user->dhost); + DoChgHost(user, newident, user->GetDisplayedHost()); } void OnChangeHost(User* user, const std::string& newhost) CXX11_OVERRIDE diff --git a/src/modules/m_ldapoper.cpp b/src/modules/m_ldapoper.cpp index 9deb9a203..45e83333a 100644 --- a/src/modules/m_ldapoper.cpp +++ b/src/modules/m_ldapoper.cpp @@ -217,7 +217,7 @@ class ModuleLDAPAuth : public Module return MOD_RES_PASSTHRU; std::string acceptedhosts = tag->getString("host"); - std::string hostname = user->ident + "@" + user->host; + std::string hostname = user->ident + "@" + user->GetRealHost(); if (!InspIRCd::MatchMask(acceptedhosts, hostname, user->GetIPString())) return MOD_RES_PASSTHRU; diff --git a/src/modules/m_messageflood.cpp b/src/modules/m_messageflood.cpp index 404c9b861..fa929294c 100644 --- a/src/modules/m_messageflood.cpp +++ b/src/modules/m_messageflood.cpp @@ -138,7 +138,7 @@ class ModuleMsgFlood : public Module if (f->ban) { Modes::ChangeList changelist; - changelist.push_add(ServerInstance->Modes->FindMode('b', MODETYPE_CHANNEL), "*!*@" + user->dhost); + changelist.push_add(ServerInstance->Modes->FindMode('b', MODETYPE_CHANNEL), "*!*@" + user->GetDisplayedHost()); ServerInstance->Modes->Process(ServerInstance->FakeClient, dest, NULL, changelist); } diff --git a/src/modules/m_repeat.cpp b/src/modules/m_repeat.cpp index aa7dc762b..f1ebe18e5 100644 --- a/src/modules/m_repeat.cpp +++ b/src/modules/m_repeat.cpp @@ -384,7 +384,7 @@ class RepeatModule : public Module if (settings->Action == ChannelSettings::ACT_BAN) { Modes::ChangeList changelist; - changelist.push_add(ServerInstance->Modes->FindMode('b', MODETYPE_CHANNEL), "*!*@" + user->dhost); + changelist.push_add(ServerInstance->Modes->FindMode('b', MODETYPE_CHANNEL), "*!*@" + user->GetDisplayedHost()); ServerInstance->Modes->Process(ServerInstance->FakeClient, chan, NULL, changelist); } diff --git a/src/modules/m_rline.cpp b/src/modules/m_rline.cpp index eb54e56b7..6fd7b832c 100644 --- a/src/modules/m_rline.cpp +++ b/src/modules/m_rline.cpp @@ -62,7 +62,7 @@ class RLine : public XLine if (lu && lu->exempt) return false; - const std::string host = u->nick + "!" + u->ident + "@" + u->host + " " + u->fullname; + const std::string host = u->nick + "!" + u->ident + "@" + u->GetRealHost() + " " + u->fullname; const std::string ip = u->nick + "!" + u->ident + "@" + u->GetIPString() + " " + u->fullname; return (regex->Matches(host) || regex->Matches(ip)); } diff --git a/src/modules/m_sasl.cpp b/src/modules/m_sasl.cpp index eedf968b4..e8a0e12a9 100644 --- a/src/modules/m_sasl.cpp +++ b/src/modules/m_sasl.cpp @@ -172,7 +172,7 @@ class SaslAuthenticator void SendHostIP() { parameterlist params; - params.push_back(user->host); + params.push_back(user->GetRealHost()); params.push_back(user->GetIPString()); params.push_back(SSLIOHook::IsSSL(&user->eh) ? "S" : "P"); diff --git a/src/modules/m_sethost.cpp b/src/modules/m_sethost.cpp index e2a5dc281..b37207b4f 100644 --- a/src/modules/m_sethost.cpp +++ b/src/modules/m_sethost.cpp @@ -53,7 +53,7 @@ class CommandSethost : public Command if (user->ChangeDisplayedHost(parameters[0])) { - ServerInstance->SNO->WriteGlobalSno('a', user->nick+" used SETHOST to change their displayed host to "+user->dhost); + ServerInstance->SNO->WriteGlobalSno('a', user->nick+" used SETHOST to change their displayed host to "+user->GetDisplayedHost()); return CMD_SUCCESS; } diff --git a/src/modules/m_showwhois.cpp b/src/modules/m_showwhois.cpp index 3cb85f3fb..99774563d 100644 --- a/src/modules/m_showwhois.cpp +++ b/src/modules/m_showwhois.cpp @@ -50,7 +50,7 @@ class WhoisNoticeCmd : public Command void HandleFast(User* dest, User* src) { dest->WriteNotice("*** " + src->nick + " (" + src->ident + "@" + - (dest->HasPrivPermission("users/auspex") ? src->host : src->dhost) + + src->GetHost(dest->HasPrivPermission("users/auspex")) + ") did a /whois on you"); } diff --git a/src/modules/m_spanningtree/opertype.cpp b/src/modules/m_spanningtree/opertype.cpp index b1d0c327e..4b1dce23c 100644 --- a/src/modules/m_spanningtree/opertype.cpp +++ b/src/modules/m_spanningtree/opertype.cpp @@ -52,7 +52,7 @@ CmdResult CommandOpertype::HandleRemote(RemoteUser* u, std::vector<std::string>& return CMD_SUCCESS; } - ServerInstance->SNO->WriteToSnoMask('O',"From %s: User %s (%s@%s) is now an IRC operator of type %s",u->server->GetName().c_str(), u->nick.c_str(),u->ident.c_str(), u->host.c_str(), opertype.c_str()); + ServerInstance->SNO->WriteToSnoMask('O',"From %s: User %s (%s@%s) is now an IRC operator of type %s",u->server->GetName().c_str(), u->nick.c_str(),u->ident.c_str(), u->GetRealHost().c_str(), opertype.c_str()); return CMD_SUCCESS; } diff --git a/src/modules/m_spanningtree/uid.cpp b/src/modules/m_spanningtree/uid.cpp index 2a17943e9..905061cc7 100644 --- a/src/modules/m_spanningtree/uid.cpp +++ b/src/modules/m_spanningtree/uid.cpp @@ -73,8 +73,8 @@ CmdResult CommandUID::HandleServer(TreeServer* remoteserver, std::vector<std::st RemoteUser* _new = new SpanningTree::RemoteUser(params[0], remoteserver); ServerInstance->Users->clientlist[params[2]] = _new; _new->nick = params[2]; - _new->host = params[3]; - _new->dhost = params[4]; + _new->ChangeRealHost(params[3], false); + _new->ChangeDisplayedHost(params[4]); _new->ident = params[5]; _new->fullname = params.back(); _new->registered = REG_ALL; @@ -157,8 +157,8 @@ CommandUID::Builder::Builder(User* user) push(user->uuid); push_int(user->age); push(user->nick); - push(user->host); - push(user->dhost); + push(user->GetRealHost()); + push(user->GetDisplayedHost()); push(user->ident); push(user->GetIPString()); push_int(user->signon); diff --git a/src/modules/m_sqloper.cpp b/src/modules/m_sqloper.cpp index b5f0d6c47..b6aa90f49 100644 --- a/src/modules/m_sqloper.cpp +++ b/src/modules/m_sqloper.cpp @@ -88,7 +88,7 @@ class OpMeQuery : public SQLQuery std::string hostname(user->ident); - hostname.append("@").append(user->host); + hostname.append("@").append(user->GetRealHost()); if (InspIRCd::MatchMask(pattern, hostname, user->GetIPString())) { diff --git a/src/modules/m_watch.cpp b/src/modules/m_watch.cpp index 6e9a6f9ed..7fa8ad8f4 100644 --- a/src/modules/m_watch.cpp +++ b/src/modules/m_watch.cpp @@ -53,9 +53,9 @@ class CommandWatch : public SplitCommand { // The away state should only be sent if the client requests away notifications for a nick but 2.0 always sends them so we do that too if (target->IsAway()) - user->WriteNumeric(RPL_NOWISAWAY, target->nick, target->ident, target->dhost, (unsigned long)target->awaytime, "is away"); + user->WriteNumeric(RPL_NOWISAWAY, target->nick, target->ident, target->GetDisplayedHost(), (unsigned long)target->awaytime, "is away"); else - user->WriteNumeric(RPL_NOWON, target->nick, target->ident, target->dhost, (unsigned long)target->age, "is online"); + user->WriteNumeric(RPL_NOWON, target->nick, target->ident, target->GetDisplayedHost(), (unsigned long)target->age, "is online"); } else if (show_offline) user->WriteNumeric(RPL_NOWOFF, nick, "*", "*", "0", "is offline"); @@ -88,7 +88,7 @@ class CommandWatch : public SplitCommand User* target = IRCv3::Monitor::Manager::FindNick(nick); if (target) - user->WriteNumeric(RPL_WATCHOFF, target->nick, target->ident, target->dhost, (unsigned long)target->age, "stopped watching"); + user->WriteNumeric(RPL_WATCHOFF, target->nick, target->ident, target->GetDisplayedHost(), (unsigned long)target->age, "stopped watching"); else user->WriteNumeric(RPL_WATCHOFF, nick, "*", "*", "0", "stopped watching"); } @@ -190,7 +190,7 @@ class ModuleWatch : public Module return; Numeric::Numeric num(numeric); - num.push(nick).push(user->ident).push(user->dhost).push(ConvToStr(shownts)).push(numerictext); + num.push(nick).push(user->ident).push(user->GetDisplayedHost()).push(ConvToStr(shownts)).push(numerictext); for (IRCv3::Monitor::WatcherList::const_iterator i = list->begin(); i != list->end(); ++i) { LocalUser* curr = *i; |