-#include "inspircd.h"
-#include "users.h"
-#include "channels.h"
-#include "modules.h"
+/* +------------------------------------+
+ * | Inspire Internet Relay Chat Daemon |
+ * +------------------------------------+
+ *
+ * InspIRCd: (C) 2002-2008 InspIRCd Development Team
+ * See: http://www.inspircd.org/wiki/index.php/Credits
+ *
+ * This program is free but copyrighted software; see
+ * the file COPYING for details.
+ *
+ * ---------------------------------------------------
+ */
+#include "inspircd.h"
#include <set>
-
#include <sstream>
-
#include <algorithm>
/* $ModDesc: Implementation of callerid (umode +g & /accept, ala hybrid etc) */
return false;
}
+
+ user->WriteServ("NOTICE %s :%s is now on your accept list", user->nick.c_str(), whotoadd->nick.c_str());
return true;
}
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;
}
virtual Version GetVersion()
{
- return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
+ return Version("$Id$", VF_COMMON | VF_VENDOR, API_VERSION);
}
virtual void On005Numeric(std::string& output)
return 0;
callerid_data* dat = GetData(dest, true);
- std::set<User*>::iterator i = dat->accepting.find(dest);
+ std::set<User*>::iterator i = dat->accepting.find(user);
if (i == dat->accepting.end())
{
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;