]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_callerid.cpp
Use loopCall to protect OnUserKick rather than the triggerevents hack
[user/henk/code/inspircd.git] / src / modules / m_callerid.cpp
index 0204ee77f0f0b4312e83fafda501cdea12bd2a7e..3592767682b49a481e4d2de80980deb77954d2fd 100644 (file)
@@ -2,8 +2,8 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
  *            the file COPYING for details.
@@ -338,9 +338,12 @@ public:
 
                if (i == dat->accepting.end())
                {
-                       time_t now = time(NULL);
+                       time_t now = ServerInstance->Time();
                        /* +g and *not* accepted */
-                       user->WriteNumeric(716, "%s %s :is in +g mode (server-side ignore).", user->nick.c_str(), dest->nick.c_str());
+                       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).");
                        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());