summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_messageflood.cpp16
-rw-r--r--src/modules/m_spanningtree.cpp31
2 files changed, 7 insertions, 40 deletions
diff --git a/src/modules/m_messageflood.cpp b/src/modules/m_messageflood.cpp
index 660c2128b..bbc4eb043 100644
--- a/src/modules/m_messageflood.cpp
+++ b/src/modules/m_messageflood.cpp
@@ -191,28 +191,24 @@ class ModuleMsgFlood : public Module
Srv->SendMode(parameters,3,user);
}
Srv->KickUser(NULL, user, dest, "Channel flood triggered (mode +f)");
- return 1;
}
}
- return 0;
}
- virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text)
- {
+ virtual void OnUserMessage(userrec* user, void* dest, int target_type, std::string text);
+ {
if (target_type == TYPE_CHANNEL)
{
- return ProcessMessages(user,(chanrec*)dest,text);
+ ProcessMessages(user,(chanrec*)dest,text);
}
- else return 0;
}
- virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text)
+ virtual void OnUserNotice(userrec* user, void* dest, int target_type, std::string text)
{
if (target_type == TYPE_CHANNEL)
{
- return ProcessMessages(user,(chanrec*)dest,text);
+ ProcessMessages(user,(chanrec*)dest,text);
}
- else return 0;
}
void OnChannelDelete(chanrec* chan)
@@ -227,7 +223,7 @@ class ModuleMsgFlood : public Module
void Implements(char* List)
{
- List[I_On005Numeric] = List[I_OnExtendedMode] = List[I_OnChannelDelete] = List[I_OnUserPreNotice] = List[I_OnUserPreMessage] = 1;
+ List[I_On005Numeric] = List[I_OnExtendedMode] = List[I_OnChannelDelete] = List[I_OnUserNotice] = List[I_OnUserMessage] = 1;
}
virtual void On005Numeric(std::string &output)
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index bc60fa82f..04fb63a8f 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -2029,26 +2029,6 @@ class TreeSocket : public InspSocket
{
return this->ForceTopic(prefix,params);
}
- else if ((command == "KICK") && (!Srv->FindNick(prefix)))
- {
- /* Server kick */
- userrec* who = Srv->FindNick(params[1]);
- chanrec* where = Srv->FindChannel(params[0]);
- server_kick_channel(who, where, (char*)params[2].c_str(), false);
- std::string sourceserv = this->myhost;
- if (this->InboundServerName != "")
- {
- sourceserv = this->InboundServerName;
- }
- if (IsServer(prefix))
- {
- return DoOneToAllButSenderRaw(line,sourceserv,prefix,command,params);
- }
- else
- {
- return true;
- }
- }
else if (command == "REHASH")
{
return this->RemoteRehash(prefix,params);
@@ -3074,16 +3054,7 @@ class ModuleSpanningTree : public Module
virtual void OnUserKick(userrec* source, userrec* user, chanrec* chan, std::string reason)
{
- if (!source)
- {
- /* Server kick (ugh) */
- std::deque<std::string> params;
- params.push_back(chan->name);
- params.push_back(user->nick);
- params.push_back(":"+reason);
- DoOneToMany(Srv->GetServerName(),"KICK",params);
- }
- else if (source->fd > -1)
+ if ((source) && (source->fd > -1))
{
std::deque<std::string> params;
params.push_back(chan->name);