diff options
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()); + } } }; |