From b81e496c6dad5a48e4158870149b6c3f4d04b9df Mon Sep 17 00:00:00 2001 From: w00t Date: Wed, 29 Oct 2008 15:21:05 +0000 Subject: 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 --- src/modules/m_chancreate.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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()); + } } }; -- cgit v1.2.3