diff options
-rw-r--r-- | docs/inspircd.conf.example | 8 | ||||
-rw-r--r-- | src/modules/m_nonicks.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_seenicks.cpp | 78 |
3 files changed, 87 insertions, 1 deletions
diff --git a/docs/inspircd.conf.example b/docs/inspircd.conf.example index d1288aecd..2259858b0 100644 --- a/docs/inspircd.conf.example +++ b/docs/inspircd.conf.example @@ -1402,6 +1402,10 @@ #<module name="m_joinflood.so"> #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# +# Jump Server module: Adds support for the RPL_REDIR numeric +#<module name="m_jumpserver.so"> + +#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # Anti-Auto-Rejoin: Adds support for prevention of auto-rejoin (+J) #<module name="m_kicknorejoin.so"> @@ -1644,6 +1648,10 @@ #<securelist waittime="60"> # #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# +# See nicks module: Allow for SNOMASK +N which shows nick changes. +#<module name="m_seenicks.so"> + +#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # Set Idle module: Adds a command for opers to change their # idle time (mainly a toy) #<module name="m_setidle.so"> diff --git a/src/modules/m_nonicks.cpp b/src/modules/m_nonicks.cpp index 403bf5abb..0532519a2 100644 --- a/src/modules/m_nonicks.cpp +++ b/src/modules/m_nonicks.cpp @@ -18,7 +18,7 @@ #include "configreader.h" #include "inspircd.h" -/* $ModDesc: Provides support for unreal-style GLOBOPS and umode +g */ +/* $ModDesc: Provides support for channel mode +N which prevents nick changes on channel */ class NoNicks : public ModeHandler { diff --git a/src/modules/m_seenicks.cpp b/src/modules/m_seenicks.cpp new file mode 100644 index 000000000..2e632a5ba --- /dev/null +++ b/src/modules/m_seenicks.cpp @@ -0,0 +1,78 @@ +/* +------------------------------------+ + * | Inspire Internet Relay Chat Daemon | + * +------------------------------------+ + * + * InspIRCd: (C) 2002-2007 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 "users.h" +#include "channels.h" +#include "modules.h" +#include "hashcomp.h" +#include "configreader.h" +#include "inspircd.h" + +/* $ModDesc: Provides support for seeing local and remote nickchanges via snomasks */ + +class ModuleSeeNicks : public Module +{ + public: + ModuleSeeNicks(InspIRCd* Me) + : Module::Module(Me) + { + ServerInstance->SNO->EnableSnomask('n',"NICK"); + ServerInstance->SNO->EnableSnomask('N',"REMOTENICK"); + } + + virtual ~ModuleSeeNicks() + { + ServerInstance->SNO->DisableSnomask('n'); + ServerInstance->SNO->DisableSnomask('N'); + } + + virtual Version GetVersion() + { + return Version(1,1,0,1, VF_VENDOR, API_VERSION); + } + + void Implements(char* List) + { + List[I_OnUserPostNick] = 1; + } + + virtual void OnUserPostNick(userrec* user, const std::string &oldnick) + { + ServerInstance->SNO->WriteToSnoMask(IS_LOCAL(user) ? 'n' : 'N',"User %s changed their nickname to %s", oldnick.c_str(), user->nick); + } +}; + +class ModuleSeeNicksFactory : public ModuleFactory +{ + public: + ModuleSeeNicksFactory() + { + } + + ~ModuleSeeNicksFactory() + { + } + + virtual Module * CreateModule(InspIRCd* Me) + { + return new ModuleSeeNicks(Me); + } + +}; + + +extern "C" void * init_module( void ) +{ + return new ModuleSeeNicksFactory; +} + |