{
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);
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)
+ /* No need to handle server kicks here */
+ if ((source) && (source->fd > -1))
{
std::deque<std::string> params;
params.push_back(chan->name);