diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-19 02:50:29 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-19 02:50:29 +0000 |
commit | c2ec183ffe0fd0db4fe3c06874a888f84738f49c (patch) | |
tree | 529ebe78164e6e272947304b611287c788f564d6 /src | |
parent | b8d39fd72b972b368924d2f15708ddee34d971ad (diff) |
Kill m_spy, which was replaced by channels/auspex in 1.2 but kept alive for nostalgia
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12497 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/channels.cpp | 23 | ||||
-rw-r--r-- | src/modules.cpp | 1 | ||||
-rw-r--r-- | src/modules/m_spy.cpp | 52 | ||||
-rw-r--r-- | src/modules/m_testnet.cpp | 1 |
4 files changed, 7 insertions, 70 deletions
diff --git a/src/channels.cpp b/src/channels.cpp index ee1ba2e1f..d0533aee6 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -746,20 +746,14 @@ void Channel::UserList(User *user) { char list[MAXBUF]; size_t dlen, curlen; - ModResult call_modules; if (!IS_LOCAL(user)) return; - FIRST_MOD_RESULT(OnUserList, call_modules, (user, this)); - - if (call_modules != MOD_RES_ALLOW) + if (this->IsModeSet('s') && !this->HasUser(user) && !user->HasPrivPermission("channels/auspex")) { - if ((this->IsModeSet('s')) && (!this->HasUser(user))) - { - user->WriteNumeric(ERR_NOSUCHNICK, "%s %s :No such nick/channel",user->nick.c_str(), this->name.c_str()); - return; - } + user->WriteNumeric(ERR_NOSUCHNICK, "%s %s :No such nick/channel",user->nick.c_str(), this->name.c_str()); + return; } dlen = curlen = snprintf(list,MAXBUF,"%s %c %s :", user->nick.c_str(), this->IsModeSet('s') ? '@' : this->IsModeSet('p') ? '*' : '=', this->name.c_str()); @@ -786,14 +780,11 @@ void Channel::UserList(User *user) std::string prefixlist = this->GetPrefixChar(i->first); std::string nick = i->first->nick; - if (call_modules != MOD_RES_DENY) - { - FOREACH_MOD(I_OnNamesListItem, OnNamesListItem(user, i->second, prefixlist, nick)); + FOREACH_MOD(I_OnNamesListItem, OnNamesListItem(user, i->second, prefixlist, nick)); - /* Nick was nuked, a module wants us to skip it */ - if (nick.empty()) - continue; - } + /* Nick was nuked, a module wants us to skip it */ + if (nick.empty()) + continue; size_t ptrlen = 0; diff --git a/src/modules.cpp b/src/modules.cpp index 6586166c8..98788c616 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -152,7 +152,6 @@ void Module::OnCleanup(int, void*) { } ModResult Module::OnChannelPreDelete(Channel*) { return MOD_RES_PASSTHRU; } void Module::OnChannelDelete(Channel*) { } ModResult Module::OnSetAway(User*, const std::string &) { return MOD_RES_PASSTHRU; } -ModResult Module::OnUserList(User*, Channel*) { return MOD_RES_PASSTHRU; } ModResult Module::OnWhoisLine(User*, User*, int&, std::string&) { return MOD_RES_PASSTHRU; } void Module::OnBuildNeighborList(User*, UserChanList&, std::map<User*,bool>&) { } void Module::OnGarbageCollect() { } diff --git a/src/modules/m_spy.cpp b/src/modules/m_spy.cpp deleted file mode 100644 index 4465235a5..000000000 --- a/src/modules/m_spy.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* +------------------------------------+ - * | Inspire Internet Relay Chat Daemon | - * +------------------------------------+ - * - * InspIRCd: (C) 2002-2010 InspIRCd Development Team - * See: http://wiki.inspircd.org/Credits - * - * This program is free but copyrighted software; see - * the file COPYING for details. - * - * --------------------------------------------------- - */ - -/* $ModDesc: Provides the ability to see the complete names list of channels an oper is not a member of */ - -#include "inspircd.h" - -class ModuleSpy : public Module -{ - public: - ModuleSpy() { - ServerInstance->Modules->Attach(I_OnUserList, this); - } - - virtual ModResult OnUserList(User* user, Channel* Ptr) - { - /* User has priv and is NOT on the channel */ - if (user->HasPrivPermission("channels/auspex") && !Ptr->HasUser(user)) - return MOD_RES_ALLOW; - - return MOD_RES_PASSTHRU; - } - - void Prioritize() - { - /* To ensure that we get priority over namesx and delayjoin for names list generation */ - Module* list[] = { ServerInstance->Modules->Find("m_namesx.so"), ServerInstance->Modules->Find("m_delayjoin.so") }; - ServerInstance->Modules->SetPriority(this, I_OnUserList, PRIORITY_BEFORE, list, 2); - } - - virtual ~ModuleSpy() - { - } - - virtual Version GetVersion() - { - return Version("Provides the ability to see the complete names list of channels an oper is not a member of", VF_VENDOR); - } -}; - -MODULE_INIT(ModuleSpy) - diff --git a/src/modules/m_testnet.cpp b/src/modules/m_testnet.cpp index cd57cb52b..faa0c7b2e 100644 --- a/src/modules/m_testnet.cpp +++ b/src/modules/m_testnet.cpp @@ -154,7 +154,6 @@ static void checkall(Module* noimpl) CHK(OnPostOper); CHK(OnSyncNetwork); CHK(OnSetAway); - CHK(OnUserList); CHK(OnPostCommand); CHK(OnPostJoin); CHK(OnWhoisLine); |