diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-30 09:03:03 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-30 09:03:03 +0000 |
commit | d54fd9b1e6b31f69332a9241b5f17330c0ad61e0 (patch) | |
tree | 4f71ce0d23547f7e634f3e8a45982db201c8f8b1 /src/modules | |
parent | 88315e8f8f0128325e17fce1fa942cc02c6e0e38 (diff) |
Wahhhhhhhhhhhh bwahahaha. Mass commit to tidy up tons of messy include lists
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5080 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_alias.cpp | 1 | ||||
-rw-r--r-- | src/modules/m_cban.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_chanprotect.cpp | 1 | ||||
-rw-r--r-- | src/modules/m_check.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_namesx.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_remove.cpp | 19 | ||||
-rw-r--r-- | src/modules/m_safelist.cpp | 18 | ||||
-rw-r--r-- | src/modules/m_services.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree.cpp | 11 | ||||
-rw-r--r-- | src/modules/m_spy.cpp | 23 |
10 files changed, 30 insertions, 55 deletions
diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp index 855b5b46c..d7ac3d04a 100644 --- a/src/modules/m_alias.cpp +++ b/src/modules/m_alias.cpp @@ -19,7 +19,6 @@ using namespace std; #include "users.h" #include "channels.h" #include "modules.h" -#include "commands.h" #include "inspircd.h" #include <vector> diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp index a774968bb..21a3533ec 100644 --- a/src/modules/m_cban.cpp +++ b/src/modules/m_cban.cpp @@ -16,15 +16,9 @@ */ #include <algorithm> -#include <vector> -#include <string> -#include <sstream> #include "users.h" #include "channels.h" #include "modules.h" - -#include "hashcomp.h" -#include "commands.h" #include "configreader.h" #include "inspircd.h" diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp index 5a6e4853d..4127f0eb3 100644 --- a/src/modules/m_chanprotect.cpp +++ b/src/modules/m_chanprotect.cpp @@ -18,7 +18,6 @@ #include "channels.h" #include "modules.h" #include "inspircd.h" -#include "commands.h" /* $ModDesc: Provides channel modes +a and +q */ diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp index b3a9dbb1f..d09793489 100644 --- a/src/modules/m_check.cpp +++ b/src/modules/m_check.cpp @@ -19,9 +19,7 @@ using namespace std; #include "users.h" #include "channels.h" #include "modules.h" -#include "commands.h" #include "inspircd.h" - #include "wildcard.h" /* $ModDesc: Provides the /check command to retrieve information on a user, channel, or IP address */ diff --git a/src/modules/m_namesx.cpp b/src/modules/m_namesx.cpp index 90c55e648..267c8f468 100644 --- a/src/modules/m_namesx.cpp +++ b/src/modules/m_namesx.cpp @@ -19,9 +19,7 @@ using namespace std; #include "users.h" #include "channels.h" #include "modules.h" -#include "commands.h" #include "inspircd.h" -#include <vector> static const char* dummy = "ON"; diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp index 0d66f0202..95c454347 100644 --- a/src/modules/m_remove.cpp +++ b/src/modules/m_remove.cpp @@ -1,14 +1,27 @@ +/* +------------------------------------+ + * | Inspire Internet Relay Chat Daemon | + * +------------------------------------+ + * + * InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev. + * E-mail: + * <brain@chatspike.net> + * <Craig@chatspike.net> + * + * Written by Craig Edwards, Craig McLure, and others. + * This program is free but copyrighted software; see + * the file COPYING for details. + * + * --------------------------------------------------- + */ + /* Support for a dancer-style /remove command, an alternative to /kick to try and avoid auto-rejoin-on-kick scripts */ /* Written by Om, 25-03-05 */ #include <sstream> -#include <string> #include "users.h" #include "channels.h" #include "modules.h" - #include "configreader.h" -#include "commands.h" #include "inspircd.h" /* $ModDesc: Provides a /remove command, this is mostly an alternative to /kick, except makes users appear to have parted the channel */ diff --git a/src/modules/m_safelist.cpp b/src/modules/m_safelist.cpp index 1f7f2742f..831ddcac5 100644 --- a/src/modules/m_safelist.cpp +++ b/src/modules/m_safelist.cpp @@ -19,10 +19,9 @@ using namespace std; #include "users.h" #include "channels.h" #include "modules.h" - -#include <vector> #include "configreader.h" #include "inspircd.h" +#include "wildcard.h" class ListData : public classbase { @@ -30,9 +29,10 @@ class ListData : public classbase long list_start; long list_position; bool list_ended; + const std::string glob; ListData() : list_start(0), list_position(0), list_ended(false) {}; - ListData(long pos, time_t t) : list_start(t), list_position(pos), list_ended(false) {}; + ListData(long pos, time_t t, const std::string &pattern) : list_start(t), list_position(pos), list_ended(false), glob(pattern) {}; }; /* $ModDesc: A module overriding /list, and making it safe - stop those sendq problems. */ @@ -52,6 +52,7 @@ class ListTimer : public InspTimer char buffer[MAXBUF]; chanrec *chan; InspIRCd* ServerInstance; + const std::string glob; public: @@ -99,6 +100,8 @@ class ListTimer : public InspTimer chan = ServerInstance->GetChannelIndex(ld->list_position); /* spool details */ bool has_user = (chan && chan->HasUser(u)); + if (!match(chan->name, ld->glob.c_str())) + continue; if ((chan) && (((!(chan->modes[CM_PRIVATE])) && (!(chan->modes[CM_SECRET]))) || (has_user))) { long users = chan->GetUserCounter(); @@ -210,7 +213,7 @@ class ModuleSafeList : public Module /* * start at channel 0! ;) */ - ld = new ListData(0,ServerInstance->Time()); + ld = new ListData(0,ServerInstance->Time(), pcnt ? parameters[0] : "*"); user->Extend("safelist_cache", ld); listusers.push_back(user); @@ -263,11 +266,8 @@ class ModuleSafeList : public Module } }; - - - -/******************************************************************************************************/ - + + class ModuleSafeListFactory : public ModuleFactory { public: diff --git a/src/modules/m_services.cpp b/src/modules/m_services.cpp index dc33cb9ed..f32964a44 100644 --- a/src/modules/m_services.cpp +++ b/src/modules/m_services.cpp @@ -19,8 +19,6 @@ using namespace std; #include "users.h" #include "channels.h" #include "modules.h" -#include "commands.h" -#include "hashcomp.h" #include "inspircd.h" static bool kludgeme = false; diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 3f515ff84..162d43590 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -18,27 +18,16 @@ using namespace std; -#include <stdio.h> -#include <vector> -#include <deque> -#include "globals.h" -#include "inspircd_config.h" -#include "hash_map.h" #include "configreader.h" #include "users.h" #include "channels.h" #include "modules.h" -#include "commands.h" #include "commands/cmd_whois.h" #include "commands/cmd_stats.h" #include "socket.h" - #include "inspircd.h" #include "wildcard.h" -#include "inspstring.h" -#include "hashcomp.h" #include "xline.h" -#include "typedefs.h" #include "cull_list.h" #include "aes.h" diff --git a/src/modules/m_spy.cpp b/src/modules/m_spy.cpp index 410d9b732..bcf2a25ac 100644 --- a/src/modules/m_spy.cpp +++ b/src/modules/m_spy.cpp @@ -23,27 +23,12 @@ using namespace std; /* $ModDesc: Provides SPYLIST and SPYNAMES capability, allowing opers to see who's in +s channels */ -#include <stdio.h> -#include <vector> -#include <deque> -#include "globals.h" #include "inspircd_config.h" -#include <ext/hash_map> #include "users.h" #include "channels.h" #include "modules.h" -#include "commands.h" -#include "socket.h" - #include "inspircd.h" -#include "inspstring.h" -#include "hashcomp.h" -#include "xline.h" -#include "typedefs.h" -#include "cull_list.h" -#include "aes.h" - -#define nspace __gnu_cxx +#include "wildcard.h" void spy_userlist(userrec *user,chanrec *c) { @@ -80,7 +65,7 @@ void spy_userlist(userrec *user,chanrec *c) class cmd_spylist : public command_t { public: - cmd_spylist (InspIRCd* Instance) : command_t(Instance,"SPYLIST", 'o', 0) + cmd_spylist (InspIRCd* Instance) : command_t(Instance,"SPYLIST", 'o', 0) { this->source = "m_spy.so"; syntax = ""; @@ -92,6 +77,8 @@ class cmd_spylist : public command_t user->WriteServ("321 %s Channel :Users Name",user->nick); for (chan_hash::const_iterator i = ServerInstance->chanlist.begin(); i != ServerInstance->chanlist.end(); i++) { + if (pcnt && !match(i->second->name, parameters[0])) + continue; user->WriteServ("322 %s %s %d :[+%s] %s",user->nick,i->second->name,i->second->GetUserCounter(),i->second->ChanModes(true),i->second->topic); } user->WriteServ("323 %s :End of channel list.",user->nick); @@ -101,7 +88,7 @@ class cmd_spylist : public command_t class cmd_spynames : public command_t { public: - cmd_spynames (InspIRCd* Instance) : command_t(Instance,"SPYNAMES", 'o', 0) + cmd_spynames (InspIRCd* Instance) : command_t(Instance,"SPYNAMES", 'o', 0) { this->source = "m_spy.so"; syntax = "{<channel>{,<channel>}}"; |