X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_callerid.cpp;h=3592767682b49a481e4d2de80980deb77954d2fd;hb=b6dbd6caab62bc2c0d11ce5a45d511611eb9c2ef;hp=623f838e37864c5a5d4ecf76a656ebb180bacb7f;hpb=fa933d7bdcb3e5fecce260f5456a00dda80f21e2;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_callerid.cpp b/src/modules/m_callerid.cpp index 623f838e3..359276768 100644 --- a/src/modules/m_callerid.cpp +++ b/src/modules/m_callerid.cpp @@ -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. @@ -239,6 +239,8 @@ public: return false; } + + user->WriteServ("NOTICE %s :%s is now on your accept list", user->nick.c_str(), whotoadd->nick.c_str()); return true; } @@ -260,6 +262,8 @@ public: return false; } + + user->WriteServ("NOTICE %s :%s is no longer on your accept list", user->nick.c_str(), whotoremove->nick.c_str()); dat->accepting.erase(i); return true; } @@ -330,17 +334,20 @@ public: return 0; callerid_data* dat = GetData(dest, true); - std::set::iterator i = dat->accepting.find(dest); + std::set::iterator i = dat->accepting.find(user); 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()); - dest->WriteNumeric(718, "%s %s %s@%s :is messaging you, and you have umode +g", dest->nick.c_str(), user->nick.c_str(), user->ident.c_str(), user->dhost.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()); dat->lastnotify = now; } return 1;