diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/extra/README | 3 | ||||
-rw-r--r-- | src/modules/extra/m_sqlite3.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_blockcolor.cpp | 10 | ||||
-rw-r--r-- | src/modules/m_chghost.cpp | 11 | ||||
-rw-r--r-- | src/modules/m_hostchange.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_ojoin.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_remove.cpp | 5 | ||||
-rw-r--r-- | src/modules/m_shun.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_stripcolor.cpp | 4 |
9 files changed, 31 insertions, 16 deletions
diff --git a/src/modules/extra/README b/src/modules/extra/README index 6dc9bb18a..2478b57cf 100644 --- a/src/modules/extra/README +++ b/src/modules/extra/README @@ -3,8 +3,7 @@ For example, m_filter_pcre requires the PCRE libraries. To compile any of these modules first ensure you have the required dependencies (read the online documentation at http://wiki.inspircd.org/) and then symlink -the .cpp file from this directory into the parent directory (src/modules/) and -re-configure your inspircd with ./configure -modupdate to detect the new module. +the .cpp file from this directory into the parent directory (src/modules/). Alternatively, use the command: ./configure --enable-extras=m_extra.cpp, which will automatically take care of symlinking the module of that name and any headers it needs diff --git a/src/modules/extra/m_sqlite3.cpp b/src/modules/extra/m_sqlite3.cpp index 3809ac738..0f99b7f1a 100644 --- a/src/modules/extra/m_sqlite3.cpp +++ b/src/modules/extra/m_sqlite3.cpp @@ -15,6 +15,10 @@ #include <sqlite3.h> #include "sql.h" +#ifdef WINDOWS +# pragma comment(lib, "sqlite3.lib") +#endif + /* $ModDesc: sqlite3 provider */ /* $CompileFlags: pkgconfversion("sqlite3","3.3") pkgconfincludes("sqlite3","/sqlite3.h","") */ /* $LinkerFlags: pkgconflibs("sqlite3","/libsqlite3.so","-lsqlite3") */ diff --git a/src/modules/m_blockcolor.cpp b/src/modules/m_blockcolor.cpp index d19317074..cbe4bc1fa 100644 --- a/src/modules/m_blockcolor.cpp +++ b/src/modules/m_blockcolor.cpp @@ -23,13 +23,13 @@ class BlockColor : public SimpleChannelModeHandler BlockColor(Module* Creator) : SimpleChannelModeHandler(Creator, "blockcolor", 'c') { } }; -class ModuleBlockColour : public Module +class ModuleBlockColor : public Module { bool AllowChanOps; BlockColor bc; public: - ModuleBlockColour() : bc(this) + ModuleBlockColor() : bc(this) { if (!ServerInstance->Modes->AddMode(&bc)) throw ModuleException("Could not add new modes!"); @@ -64,7 +64,7 @@ class ModuleBlockColour : public Module case 21: case 22: case 31: - user->WriteNumeric(404, "%s %s :Can't send colours to channel (+c set)",user->nick.c_str(), c->name.c_str()); + user->WriteNumeric(404, "%s %s :Can't send colors to channel (+c set)",user->nick.c_str(), c->name.c_str()); return MOD_RES_DENY; break; } @@ -79,7 +79,7 @@ class ModuleBlockColour : public Module return OnUserPreMessage(user,dest,target_type,text,status,exempt_list); } - virtual ~ModuleBlockColour() + virtual ~ModuleBlockColor() { } @@ -89,4 +89,4 @@ class ModuleBlockColour : public Module } }; -MODULE_INIT(ModuleBlockColour) +MODULE_INIT(ModuleBlockColor) diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp index 8c3911418..0262a5f37 100644 --- a/src/modules/m_chghost.cpp +++ b/src/modules/m_chghost.cpp @@ -33,6 +33,12 @@ class CommandChghost : public Command { const char* x = parameters[1].c_str(); + if (parameters[1].length() > 63) + { + user->WriteServ("NOTICE %s :*** CHGHOST: Host too long", user->nick.c_str()); + return CMD_FAILURE; + } + for (; *x; x++) { if (!hostmap[(unsigned char)*x]) @@ -42,11 +48,6 @@ class CommandChghost : public Command } } - if ((parameters[1].c_str() - x) > 63) - { - user->WriteServ("NOTICE %s :*** CHGHOST: Host too long", user->nick.c_str()); - return CMD_FAILURE; - } User* dest = ServerInstance->FindNick(parameters[0]); if (!dest) diff --git a/src/modules/m_hostchange.cpp b/src/modules/m_hostchange.cpp index 20c7e5bc2..6e4600da6 100644 --- a/src/modules/m_hostchange.cpp +++ b/src/modules/m_hostchange.cpp @@ -73,7 +73,7 @@ class ModuleHostChange : public Module for (int index = 0; index < Conf.Enumerate("hostchange"); index++) { std::string mask = Conf.ReadValue("hostchange", "mask", index); - std::string ports = Conf.ReadValue("hosthange", "ports", index); + std::string ports = Conf.ReadValue("hostchange", "ports", index); std::string action = Conf.ReadValue("hostchange", "action", index); std::string newhost = Conf.ReadValue("hostchange", "value", index); Host* x = new Host; diff --git a/src/modules/m_ojoin.cpp b/src/modules/m_ojoin.cpp index bbe3f05bb..c326321b0 100644 --- a/src/modules/m_ojoin.cpp +++ b/src/modules/m_ojoin.cpp @@ -242,7 +242,7 @@ class ModuleOjoin : public Module Version GetVersion() { - return Version("Network Buisness Join", VF_VENDOR); + return Version("Network Business Join", VF_VENDOR); } }; diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp index 2394332be..ffbae43bb 100644 --- a/src/modules/m_remove.cpp +++ b/src/modules/m_remove.cpp @@ -77,6 +77,11 @@ class RemoveBase : public Command hasnokicks = (ServerInstance->Modules->Find("m_nokicks.so") && channel->IsModeSet('Q')); + if((ServerInstance->ULine(target->server) || ServerInstance->ULine(target->nick.c_str()))){ + user->WriteNumeric(482, "%s %s :Only a u-line may remove a u-line from a channel.", user->nick.c_str(), channame); + return CMD_FAILURE; + } + /* We support the +Q channel mode via. the m_nokicks module, if the module is loaded and the mode is set then disallow the /remove */ if ((!IS_LOCAL(user)) || (!supportnokicks || !hasnokicks)) { diff --git a/src/modules/m_shun.cpp b/src/modules/m_shun.cpp index 6d7f12562..e11aa9956 100644 --- a/src/modules/m_shun.cpp +++ b/src/modules/m_shun.cpp @@ -202,6 +202,12 @@ class ModuleShun : public Module ServerInstance->XLines->UnregisterFactory(&f); } + void Prioritize() + { + Module* alias = ServerInstance->Modules->Find("m_alias.so"); + ServerInstance->Modules->SetPriority(this, I_OnPreCommand, PRIORITY_BEFORE, &alias); + } + virtual ModResult OnStats(char symbol, User* user, string_list& out) { if (symbol != 'H') diff --git a/src/modules/m_stripcolor.cpp b/src/modules/m_stripcolor.cpp index c2246a0d9..83358922b 100644 --- a/src/modules/m_stripcolor.cpp +++ b/src/modules/m_stripcolor.cpp @@ -13,7 +13,7 @@ #include "inspircd.h" -/* $ModDesc: Provides channel +S mode (strip ansi colour) */ +/* $ModDesc: Provides channel +S mode (strip ansi color) */ /** Handles channel mode +S */ @@ -137,7 +137,7 @@ class ModuleStripColor : public Module virtual Version GetVersion() { - return Version("Provides channel +S mode (strip ansi colour)", VF_VENDOR); + return Version("Provides channel +S mode (strip ansi color)", VF_VENDOR); } }; |