]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
m_chancreate Fix snonotices not being sent when remote users create channels
authorattilamolnar <attilamolnar@hush.com>
Fri, 12 Oct 2012 02:31:01 +0000 (04:31 +0200)
committerattilamolnar <attilamolnar@hush.com>
Sat, 13 Oct 2012 14:13:12 +0000 (16:13 +0200)
Fixes #318

src/modules/m_chancreate.cpp

index 48f60a8d91b91433ffe28a15cd57627ba8390994..833d6a774968e947a5a0eaa98f1eeb905953035e 100644 (file)
@@ -42,16 +42,9 @@ class ModuleChanCreate : public Module
 
        void OnUserJoin(Membership* memb, bool sync, bool created, CUList& except)
        {
-               if (created)
+               if ((created) && (IS_LOCAL(memb->user)))
                {
-                       if (IS_LOCAL(memb->user))
-                               ServerInstance->SNO->WriteToSnoMask('j', "Channel %s created by %s!%s@%s",
-                                       memb->chan->name.c_str(), memb->user->nick.c_str(),
-                                       memb->user->ident.c_str(), memb->user->host.c_str());
-                       else
-                               ServerInstance->SNO->WriteGlobalSno('J', "Channel %s created by %s!%s@%s",
-                                       memb->chan->name.c_str(), memb->user->nick.c_str(),
-                                       memb->user->ident.c_str(), memb->user->host.c_str());
+                       ServerInstance->SNO->WriteGlobalSno('j', "Channel %s created by %s", memb->chan->name.c_str(), memb->user->GetFullRealHost().c_str());
                }
        }
 };