diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-13 20:31:11 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-13 20:31:11 +0000 |
commit | b4be0c94ab5fb7e5a7a799a195c78de072a5e315 (patch) | |
tree | 48dee3440b9bf1227f39ca2539d7fe55ad53df8b /src/modules/m_chancreate.cpp | |
parent | ace3d85982f99ab04318ce705fd29fec5ffd7320 (diff) |
Module API changes to use Membership* where sensible
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11699 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_chancreate.cpp')
-rw-r--r-- | src/modules/m_chancreate.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/modules/m_chancreate.cpp b/src/modules/m_chancreate.cpp index c37ffd690..8acddcbf4 100644 --- a/src/modules/m_chancreate.cpp +++ b/src/modules/m_chancreate.cpp @@ -28,26 +28,24 @@ class ModuleChanCreate : public Module ServerInstance->Modules->Attach(eventlist, this, 1); } - virtual ~ModuleChanCreate() + ~ModuleChanCreate() { ServerInstance->SNO->DisableSnomask('j'); ServerInstance->SNO->DisableSnomask('J'); } - virtual Version GetVersion() + Version GetVersion() { return Version("$Id$",VF_VENDOR,API_VERSION); } - virtual void OnUserJoin(User* user, Channel* channel, bool sync, bool &silent, bool created) + void OnUserJoin(Membership* memb, bool sync, bool created, CUList& except) { if (created) { - 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()); + ServerInstance->SNO->WriteToSnoMask(IS_LOCAL(memb->user) ? 'j' : '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()); } } }; |