summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r--src/modules/m_spanningtree/main.cpp26
-rw-r--r--src/modules/m_spanningtree/main.h70
2 files changed, 48 insertions, 48 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index 5e30ced35..2549461f1 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -600,19 +600,19 @@ void ModuleSpanningTree::OnUserConnect(User* user)
Utils->TreeRoot->SetUserCount(1); // increment by 1
}
-void ModuleSpanningTree::OnUserJoin(User* user, Channel* channel, bool sync, bool &silent, bool created)
+void ModuleSpanningTree::OnUserJoin(Membership* memb, bool sync, bool created, CUList& excepts)
{
// Only do this for local users
- if (IS_LOCAL(user))
+ if (IS_LOCAL(memb->user))
{
parameterlist params;
// set up their permissions and the channel TS with FJOIN.
// All users are FJOINed now, because a module may specify
// new joining permissions for the user.
- params.push_back(channel->name);
- params.push_back(ConvToStr(channel->age));
- params.push_back(std::string("+") + channel->ChanModes(true));
- params.push_back(ServerInstance->Modes->ModeString(user, channel, false)+","+std::string(user->uuid));
+ params.push_back(memb->chan->name);
+ params.push_back(ConvToStr(memb->chan->age));
+ params.push_back(std::string("+") + memb->chan->ChanModes(true));
+ params.push_back(memb->modes+","+std::string(memb->user->uuid));
Utils->DoOneToMany(ServerInstance->Config->GetSID(),"FJOIN",params);
}
}
@@ -650,15 +650,15 @@ void ModuleSpanningTree::OnChangeIdent(User* user, const std::string &ident)
Utils->DoOneToMany(user->uuid,"FIDENT",params);
}
-void ModuleSpanningTree::OnUserPart(User* user, Channel* channel, std::string &partmessage, bool &silent)
+void ModuleSpanningTree::OnUserPart(Membership* memb, std::string &partmessage, CUList& excepts)
{
- if (IS_LOCAL(user))
+ if (IS_LOCAL(memb->user))
{
parameterlist params;
- params.push_back(channel->name);
+ params.push_back(memb->chan->name);
if (!partmessage.empty())
params.push_back(":"+partmessage);
- Utils->DoOneToMany(user->uuid,"PART",params);
+ Utils->DoOneToMany(memb->user->uuid,"PART",params);
}
}
@@ -710,11 +710,11 @@ void ModuleSpanningTree::OnUserPostNick(User* user, const std::string &oldnick)
}
}
-void ModuleSpanningTree::OnUserKick(User* source, User* user, Channel* chan, const std::string &reason, bool &silent)
+void ModuleSpanningTree::OnUserKick(User* source, Membership* memb, const std::string &reason, CUList& excepts)
{
parameterlist params;
- params.push_back(chan->name);
- params.push_back(user->uuid);
+ params.push_back(memb->chan->name);
+ params.push_back(memb->user->uuid);
params.push_back(":"+reason);
if (IS_LOCAL(source))
{
diff --git a/src/modules/m_spanningtree/main.h b/src/modules/m_spanningtree/main.h
index 04f281b28..1d3ec9d39 100644
--- a/src/modules/m_spanningtree/main.h
+++ b/src/modules/m_spanningtree/main.h
@@ -157,42 +157,42 @@ class ModuleSpanningTree : public Module
** *** MODULE EVENTS ***
**/
- virtual ModResult OnPreCommand(std::string &command, std::vector<std::string>& parameters, User *user, bool validated, const std::string &original_line);
- virtual void OnPostCommand(const std::string &command, const std::vector<std::string>& parameters, User *user, CmdResult result, const std::string &original_line);
- virtual void OnGetServerDescription(const std::string &servername,std::string &description);
- virtual void OnUserConnect(User* source);
- virtual void OnUserInvite(User* source,User* dest,Channel* channel, time_t);
- virtual void OnPostTopicChange(User* user, Channel* chan, const std::string &topic);
- virtual void OnWallops(User* user, const std::string &text);
- virtual void OnUserNotice(User* user, void* dest, int target_type, const std::string &text, char status, const CUList &exempt_list);
- virtual void OnUserMessage(User* user, void* dest, int target_type, const std::string &text, char status, const CUList &exempt_list);
- virtual void OnBackgroundTimer(time_t curtime);
- virtual void OnUserJoin(User* user, Channel* channel, bool sync, bool &silent, bool created);
- virtual ModResult OnChangeLocalUserHost(User* user, const std::string &newhost);
- virtual void OnChangeName(User* user, const std::string &gecos);
- virtual void OnChangeIdent(User* user, const std::string &ident);
- virtual void OnUserPart(User* user, Channel* channel, std::string &partmessage, bool &silent);
- virtual void OnUserQuit(User* user, const std::string &reason, const std::string &oper_message);
- virtual void OnUserPostNick(User* user, const std::string &oldnick);
- virtual void OnUserKick(User* source, User* user, Channel* chan, const std::string &reason, bool &silent);
- virtual void OnRemoteKill(User* source, User* dest, const std::string &reason, const std::string &operreason);
- virtual void OnPreRehash(User* user, const std::string &parameter);
- virtual void OnRehash(User* user);
- virtual void OnOper(User* user, const std::string &opertype);
+ ModResult OnPreCommand(std::string &command, std::vector<std::string>& parameters, User *user, bool validated, const std::string &original_line);
+ void OnPostCommand(const std::string &command, const std::vector<std::string>& parameters, User *user, CmdResult result, const std::string &original_line);
+ void OnGetServerDescription(const std::string &servername,std::string &description);
+ void OnUserConnect(User* source);
+ void OnUserInvite(User* source,User* dest,Channel* channel, time_t);
+ void OnPostTopicChange(User* user, Channel* chan, const std::string &topic);
+ void OnWallops(User* user, const std::string &text);
+ void OnUserNotice(User* user, void* dest, int target_type, const std::string &text, char status, const CUList &exempt_list);
+ void OnUserMessage(User* user, void* dest, int target_type, const std::string &text, char status, const CUList &exempt_list);
+ void OnBackgroundTimer(time_t curtime);
+ void OnUserJoin(Membership* memb, bool sync, bool created, CUList& excepts);
+ ModResult OnChangeLocalUserHost(User* user, const std::string &newhost);
+ void OnChangeName(User* user, const std::string &gecos);
+ void OnChangeIdent(User* user, const std::string &ident);
+ void OnUserPart(Membership* memb, std::string &partmessage, CUList& excepts);
+ void OnUserQuit(User* user, const std::string &reason, const std::string &oper_message);
+ void OnUserPostNick(User* user, const std::string &oldnick);
+ void OnUserKick(User* source, Membership* memb, const std::string &reason, CUList& excepts);
+ void OnRemoteKill(User* source, User* dest, const std::string &reason, const std::string &operreason);
+ void OnPreRehash(User* user, const std::string &parameter);
+ void OnRehash(User* user);
+ void OnOper(User* user, const std::string &opertype);
void OnLine(User* source, const std::string &host, bool adding, char linetype, long duration, const std::string &reason);
- virtual void OnAddLine(User *u, XLine *x);
- virtual void OnDelLine(User *u, XLine *x);
- virtual void OnMode(User* user, void* dest, int target_type, const std::vector<std::string> &text, const std::vector<TranslateType> &translate);
- virtual ModResult OnStats(char statschar, User* user, string_list &results);
- virtual ModResult OnSetAway(User* user, const std::string &awaymsg);
- virtual void ProtoSendMode(void* opaque, TargetTypeFlags target_type, void* target, const std::vector<std::string> &modeline, const std::vector<TranslateType> &translate);
- virtual void ProtoSendMetaData(void* opaque, Extensible* target, const std::string &extname, const std::string &extdata);
- virtual std::string ProtoTranslate(Extensible* item);
- virtual void OnEvent(Event* event);
- virtual void OnLoadModule(Module* mod,const std::string &name);
- virtual void OnUnloadModule(Module* mod,const std::string &name);
- virtual ~ModuleSpanningTree();
- virtual Version GetVersion();
+ void OnAddLine(User *u, XLine *x);
+ void OnDelLine(User *u, XLine *x);
+ void OnMode(User* user, void* dest, int target_type, const std::vector<std::string> &text, const std::vector<TranslateType> &translate);
+ ModResult OnStats(char statschar, User* user, string_list &results);
+ ModResult OnSetAway(User* user, const std::string &awaymsg);
+ void ProtoSendMode(void* opaque, TargetTypeFlags target_type, void* target, const std::vector<std::string> &modeline, const std::vector<TranslateType> &translate);
+ void ProtoSendMetaData(void* opaque, Extensible* target, const std::string &extname, const std::string &extdata);
+ std::string ProtoTranslate(Extensible* item);
+ void OnEvent(Event* event);
+ void OnLoadModule(Module* mod,const std::string &name);
+ void OnUnloadModule(Module* mod,const std::string &name);
+ ~ModuleSpanningTree();
+ Version GetVersion();
void Prioritize();
};