diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-10-29 15:21:05 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-10-29 15:21:05 +0000 |
commit | b81e496c6dad5a48e4158870149b6c3f4d04b9df (patch) | |
tree | 8867d34973fec07a5f6447d62e6d28678c5cc72b /src/modules | |
parent | 664f69890abbad7962bf42c599417dd767a84297 (diff) |
Add +s +J - for remote channel creation. This helps m_chanlog stop being quite so silly, and also means that opers on larger networks won't be flooded to death.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10748 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_chancreate.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/modules/m_chancreate.cpp b/src/modules/m_chancreate.cpp index d73437ea0..7da6f9379 100644 --- a/src/modules/m_chancreate.cpp +++ b/src/modules/m_chancreate.cpp @@ -23,6 +23,7 @@ class ModuleChanCreate : public Module : Module(Me) { ServerInstance->SNO->EnableSnomask('j', "CHANCREATE"); + ServerInstance->SNO->EnableSnomask('J', "REMOTECHANCREATE"); Implementation eventlist[] = { I_OnUserJoin }; ServerInstance->Modules->Attach(eventlist, this, 1); } @@ -30,6 +31,7 @@ class ModuleChanCreate : public Module virtual ~ModuleChanCreate() { ServerInstance->SNO->DisableSnomask('j'); + ServerInstance->SNO->DisableSnomask('J'); } virtual Version GetVersion() @@ -41,7 +43,12 @@ class ModuleChanCreate : public Module virtual void OnUserJoin(User* user, Channel* channel, bool sync, bool &silent) { if (channel->GetUserCounter() == 1 && !channel->IsModeSet('P')) - ServerInstance->SNO->WriteToSnoMask('j', "Channel %s created by %s!%s@%s", channel->name.c_str(), user->nick.c_str(), user->ident.c_str(), user->host.c_str()); + { + if (IS_LOCAL(user)) + ServerInstance->SNO->WriteToSnoMask('j', "Channel %s created by %s!%s@%s", channel->name.c_str(), user->nick.c_str(), user->ident.c_str(), user->host.c_str()); + else + ServerInstance->SNO->WriteToSnoMask('J', "Channel %s created by %s!%s@%s", channel->name.c_str(), user->nick.c_str(), user->ident.c_str(), user->host.c_str()); + } } }; |