summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2009-06-30 17:16:33 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2009-06-30 17:16:33 +0000
commit149c3431f50fd1de133202fc76658b65f20e30d4 (patch)
treee25ef0ef0a6244e3f6b4f9e5a3a58f7a1f7fd0af
parent53443c32a65730d043d3210f5f715e58397ebe2b (diff)
Fix +g messages being borked with multiple servers, fixes bug #880
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11421 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/m_callerid.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/modules/m_callerid.cpp b/src/modules/m_callerid.cpp
index 873ec7ed2..3486f1439 100644
--- a/src/modules/m_callerid.cpp
+++ b/src/modules/m_callerid.cpp
@@ -400,14 +400,18 @@ public:
{
time_t now = ServerInstance->Time();
/* +g and *not* accepted */
- if (IS_LOCAL(user))
- user->WriteNumeric(716, "%s %s :is in +g mode (server-side ignore).", user->nick.c_str(), dest->nick.c_str());
- else
- ServerInstance->PI->PushToClient(user, std::string("::") + ServerInstance->Config->ServerName + " 716 " + user->nick + dest->nick + " :is in +g mode (server-side ignore).");
+ user->WriteNumeric(716, "%s %s :is in +g mode (server-side ignore).", user->nick.c_str(), dest->nick.c_str());
if (now > (dat->lastnotify + (time_t)notify_cooldown))
{
user->WriteNumeric(717, "%s %s :has been informed that you messaged them.", user->nick.c_str(), dest->nick.c_str());
- dest->WriteNumeric(718, "%s %s %s@%s :is messaging you, and you have umode +g. Use /ACCEPT +%s to allow.", dest->nick.c_str(), user->nick.c_str(), user->ident.c_str(), user->dhost.c_str(), user->nick.c_str());
+ if (IS_LOCAL(dest))
+ {
+ dest->WriteNumeric(718, "%s %s %s@%s :is messaging you, and you have umode +g. Use /ACCEPT +%s to allow.", dest->nick.c_str(), user->nick.c_str(), user->ident.c_str(), user->dhost.c_str(), user->nick.c_str());
+ }
+ else
+ {
+ ServerInstance->PI->PushToClient(user, std::string("::") + ServerInstance->Config->ServerName + " 718 " + dest->nick + " " + user->nick + " " + user->ident + "@" + user->dhost + " :is messaging you, and you have umode +g. Use /ACCEPT +" + user->nick + " to allow.");
+ }
dat->lastnotify = now;
}
return 1;