diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-01-19 15:16:24 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-01-19 15:16:24 +0000 |
commit | b5965b08c23e3e89404b481386f2e56ce7cb7ce2 (patch) | |
tree | 842721a7e76de1cb7807a55d287498783e2dbc88 /src | |
parent | 80abf1ed3ef868b1cad85785b2386f5cbd818ba4 (diff) |
Extbans can be VF_OPTCOMMON as they do not desync on module add/remove
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12303 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/command_parse.cpp | 15 | ||||
-rw-r--r-- | src/modules/m_channelban.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_customtitle.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_gecosban.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_globops.cpp | 9 | ||||
-rw-r--r-- | src/modules/m_knock.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_muteban.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_nopartmsg.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_serverban.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_services_account.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree/compat.cpp | 10 | ||||
-rw-r--r-- | src/modules/m_uninvite.cpp | 4 |
12 files changed, 25 insertions, 31 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp index 61c23bf62..2e20fc27f 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -12,17 +12,6 @@ */ #include "inspircd.h" -#include "xline.h" -#include "socketengine.h" -#include "socket.h" -#include "command_parse.h" -#include "exitcodes.h" - -/* Directory Searching for Unix-Only */ -#ifndef WIN32 -#include <dirent.h> -#include <dlfcn.h> -#endif int InspIRCd::PassCompare(Extensible* ex, const std::string &data, const std::string &input, const std::string &hashtype) { @@ -204,10 +193,10 @@ bool CommandParser::ProcessCommand(LocalUser *user, std::string &cmd) /* Modify the user's penalty regardless of whether or not the command exists */ bool do_more = true; - if (IS_LOCAL(user) && !user->HasPrivPermission("users/flood/no-throttle")) + if (!user->HasPrivPermission("users/flood/no-throttle")) { // If it *doesn't* exist, give it a slightly heftier penalty than normal to deter flooding us crap - IS_LOCAL(user)->CommandFloodPenalty += cm != cmdlist.end() ? cm->second->Penalty * 1000 : 2000; + user->CommandFloodPenalty += cm != cmdlist.end() ? cm->second->Penalty * 1000 : 2000; } diff --git a/src/modules/m_channelban.cpp b/src/modules/m_channelban.cpp index 8f70f7d20..85f3fff7d 100644 --- a/src/modules/m_channelban.cpp +++ b/src/modules/m_channelban.cpp @@ -30,7 +30,7 @@ class ModuleBadChannelExtban : public Module Version GetVersion() { - return Version("Extban 'j' - channel status/join ban", VF_COMMON|VF_VENDOR); + return Version("Extban 'j' - channel status/join ban", VF_OPTCOMMON|VF_VENDOR); } ModResult OnCheckBan(User *user, Channel *c, const std::string& mask) diff --git a/src/modules/m_customtitle.cpp b/src/modules/m_customtitle.cpp index 9e85fde40..446ac2475 100644 --- a/src/modules/m_customtitle.cpp +++ b/src/modules/m_customtitle.cpp @@ -116,7 +116,7 @@ class ModuleCustomTitle : public Module Version GetVersion() { - return Version("Custom Title for users", VF_COMMON | VF_VENDOR); + return Version("Custom Title for users", VF_OPTCOMMON | VF_VENDOR); } }; diff --git a/src/modules/m_gecosban.cpp b/src/modules/m_gecosban.cpp index c60073b70..0f3c75f24 100644 --- a/src/modules/m_gecosban.cpp +++ b/src/modules/m_gecosban.cpp @@ -30,7 +30,7 @@ class ModuleGecosBan : public Module Version GetVersion() { - return Version("Extban 'r' - realname (gecos) ban", VF_COMMON|VF_VENDOR); + return Version("Extban 'r' - realname (gecos) ban", VF_OPTCOMMON|VF_VENDOR); } ModResult OnCheckBan(User *user, Channel *c, const std::string& mask) diff --git a/src/modules/m_globops.cpp b/src/modules/m_globops.cpp index 2934fb0de..f02f8a1b2 100644 --- a/src/modules/m_globops.cpp +++ b/src/modules/m_globops.cpp @@ -36,15 +36,10 @@ class CommandGlobops : public Command line = line + parameters[i] + " "; } ServerInstance->SNO->WriteToSnoMask('g',line); + ServerInstance->PI->SendSNONotice("g", line); - /* route it (ofc :p) */ return CMD_SUCCESS; } - - RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters) - { - return ROUTE_BROADCAST; - } }; class ModuleGlobops : public Module @@ -66,7 +61,7 @@ class ModuleGlobops : public Module virtual Version GetVersion() { - return Version("Provides support for GLOBOPS and user mode +g", VF_COMMON | VF_VENDOR); + return Version("Provides support for GLOBOPS and user mode +g", VF_OPTCOMMON | VF_VENDOR); } }; diff --git a/src/modules/m_knock.cpp b/src/modules/m_knock.cpp index 3ae86de34..30d08efb5 100644 --- a/src/modules/m_knock.cpp +++ b/src/modules/m_knock.cpp @@ -68,7 +68,7 @@ class CommandKnock : public Command RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters) { - return ROUTE_BROADCAST; + return ROUTE_OPT_BCAST; } }; @@ -100,7 +100,7 @@ class ModuleKnock : public Module virtual Version GetVersion() { - return Version("Provides support for /KNOCK and mode +K", VF_COMMON | VF_VENDOR); + return Version("Provides support for /KNOCK and mode +K", VF_OPTCOMMON | VF_VENDOR); } }; diff --git a/src/modules/m_muteban.cpp b/src/modules/m_muteban.cpp index daee818a9..1445889ae 100644 --- a/src/modules/m_muteban.cpp +++ b/src/modules/m_muteban.cpp @@ -30,7 +30,7 @@ class ModuleQuietBan : public Module virtual Version GetVersion() { - return Version("Implements extban +b m: - mute bans",VF_COMMON|VF_VENDOR); + return Version("Implements extban +b m: - mute bans",VF_OPTCOMMON|VF_VENDOR); } virtual ModResult OnUserPreMessage(User *user, void *dest, int target_type, std::string &text, char status, CUList &exempt_list) diff --git a/src/modules/m_nopartmsg.cpp b/src/modules/m_nopartmsg.cpp index 6f84122f4..51ee659cd 100644 --- a/src/modules/m_nopartmsg.cpp +++ b/src/modules/m_nopartmsg.cpp @@ -31,7 +31,7 @@ class ModulePartMsgBan : public Module virtual Version GetVersion() { - return Version("Implements extban +b p: - part message bans", VF_COMMON|VF_VENDOR); + return Version("Implements extban +b p: - part message bans", VF_OPTCOMMON|VF_VENDOR); } diff --git a/src/modules/m_serverban.cpp b/src/modules/m_serverban.cpp index 49fd4298f..1a3030c0b 100644 --- a/src/modules/m_serverban.cpp +++ b/src/modules/m_serverban.cpp @@ -30,7 +30,7 @@ class ModuleServerBan : public Module Version GetVersion() { - return Version("Extban 's' - server ban",VF_COMMON|VF_VENDOR); + return Version("Extban 's' - server ban",VF_OPTCOMMON|VF_VENDOR); } ModResult OnCheckBan(User *user, Channel *c, const std::string& mask) diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp index 069bcc837..3f1913de4 100644 --- a/src/modules/m_services_account.cpp +++ b/src/modules/m_services_account.cpp @@ -278,7 +278,7 @@ class ModuleServicesAccount : public Module Version GetVersion() { - return Version("Povides support for ircu-style services accounts, including chmode +R, etc.",VF_COMMON|VF_VENDOR); + return Version("Povides support for ircu-style services accounts, including chmode +R, etc.",VF_OPTCOMMON|VF_VENDOR); } }; diff --git a/src/modules/m_spanningtree/compat.cpp b/src/modules/m_spanningtree/compat.cpp index 3194bb103..22155fd2c 100644 --- a/src/modules/m_spanningtree/compat.cpp +++ b/src/modules/m_spanningtree/compat.cpp @@ -26,14 +26,18 @@ static const char* const forge_common_1201[] = { "m_censor.so", "m_chanfilter.so", "m_chanhistory.so", + "m_channelban.so", "m_chanprotect.so", "m_chghost.so", "m_chgname.so", "m_commonchans.so", + "m_customtitle.so", "m_deaf.so", "m_delayjoin.so", "m_delaymsg.so", "m_exemptchanops.so", + "m_gecosban.so", + "m_globops.so", "m_helpop.so", "m_hidechans.so", "m_hideoper.so", @@ -41,13 +45,16 @@ static const char* const forge_common_1201[] = { "m_inviteexception.so", "m_joinflood.so", "m_kicknorejoin.so", + "m_knock.so", "m_messageflood.so", + "m_muteban.so", "m_nickflood.so", "m_nicklock.so", "m_noctcp.so", "m_nokicks.so", "m_nonicks.so", "m_nonotice.so", + "m_nopartmsg.so", "m_ojoin.so", "m_operprefix.so", "m_permchannels.so", @@ -62,6 +69,8 @@ static const char* const forge_common_1201[] = { "m_sanick.so", "m_sapart.so", "m_saquit.so", + "m_serverban.so", + "m_services_account.so", "m_servprotect.so", "m_setident.so", "m_showwhois.so", @@ -69,6 +78,7 @@ static const char* const forge_common_1201[] = { "m_sslmodes.so", "m_stripcolor.so", "m_swhois.so", + "m_uninvite.so", "m_watch.so" }; diff --git a/src/modules/m_uninvite.cpp b/src/modules/m_uninvite.cpp index 7b88e6124..cbddedd2b 100644 --- a/src/modules/m_uninvite.cpp +++ b/src/modules/m_uninvite.cpp @@ -78,7 +78,7 @@ class CommandUninvite : public Command RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters) { User* u = ServerInstance->FindNick(parameters[0]); - return u ? ROUTE_UNICAST(u->server) : ROUTE_LOCALONLY; + return u ? ROUTE_OPT_UCAST(u->server) : ROUTE_LOCALONLY; } }; @@ -99,7 +99,7 @@ class ModuleUninvite : public Module virtual Version GetVersion() { - return Version("Provides the UNINVITE command which lets users un-invite other users from channels", VF_VENDOR | VF_COMMON); + return Version("Provides the UNINVITE command which lets users un-invite other users from channels", VF_VENDOR | VF_OPTCOMMON); } }; |