From 149c3431f50fd1de133202fc76658b65f20e30d4 Mon Sep 17 00:00:00 2001 From: w00t Date: Tue, 30 Jun 2009 17:16:33 +0000 Subject: 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 --- src/modules/m_callerid.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src') 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; -- cgit v1.2.3