mirror of
https://github.com/anope/anope.git
synced 2026-07-05 18:43:12 +02:00
Fixed bug #1187 - Fixed releasing enforcer clients on TS6 IRCds
This commit is contained in:
@@ -258,10 +258,10 @@ class BahamutIRCdProto : public IRCDProto
|
||||
send_cmd(source->nick, "KICK %s %s", chan->name.c_str(), user->nick.c_str());
|
||||
}
|
||||
|
||||
void SendClientIntroduction(const Anope::string &nick, const Anope::string &user, const Anope::string &host, const Anope::string &real, const Anope::string &modes, const Anope::string &)
|
||||
void SendClientIntroduction(const User *u, const Anope::string &modes)
|
||||
{
|
||||
EnforceQlinedNick(nick, Config->s_BotServ);
|
||||
send_cmd("", "NICK %s 1 %ld %s %s %s %s 0 0 :%s", nick.c_str(), static_cast<long>(time(NULL)), modes.c_str(), user.c_str(), host.c_str(), Config->ServerName.c_str(), real.c_str());
|
||||
EnforceQlinedNick(u->nick, Config->s_BotServ);
|
||||
send_cmd("", "NICK %s 1 %ld %s %s %s %s 0 0 :%s", u->nick.c_str(), u->timestamp, modes.c_str(), u->GetIdent().c_str(), u->host.c_str(), u->server->GetName().c_str(), u->realname.c_str());
|
||||
}
|
||||
|
||||
/* SVSMODE +d */
|
||||
|
||||
@@ -146,10 +146,10 @@ class InspIRCdProto : public IRCDProto
|
||||
send_cmd(bi ? bi->nick : Config->ServerName, "MODE %s %s", u->nick.c_str(), buf.c_str());
|
||||
}
|
||||
|
||||
void SendClientIntroduction(const Anope::string &nick, const Anope::string &user, const Anope::string &host, const Anope::string &real, const Anope::string &modes, const Anope::string &)
|
||||
void SendClientIntroduction(const User *u, const Anope::string &modes)
|
||||
{
|
||||
send_cmd(Config->ServerName, "NICK %ld %s %s %s %s %s 0.0.0.0 :%s", static_cast<long>(time(NULL)), nick.c_str(), host.c_str(), host.c_str(), user.c_str(), modes.c_str(), real.c_str());
|
||||
send_cmd(nick, "OPERTYPE Service");
|
||||
send_cmd(Config->ServerName, "NICK %ld %s %s %s %s %s 0.0.0.0 :%s", u->timestamp, u->nick.c_str(), u->host.c_str(), u->host.c_str(), u->GetIdent().c_str(), modes.c_str(), u->realname.c_str());
|
||||
send_cmd(u->nick, "OPERTYPE Service");
|
||||
}
|
||||
|
||||
void SendKickInternal(const BotInfo *source, const Channel *chan, const User *user, const Anope::string &buf)
|
||||
|
||||
@@ -75,10 +75,8 @@ void inspircd_cmd_chghost(const Anope::string &nick, const Anope::string &vhost)
|
||||
int anope_event_idle(const Anope::string &source, int ac, const char **av)
|
||||
{
|
||||
BotInfo *bi = findbot(av[0]);
|
||||
if (!bi)
|
||||
return MOD_CONT;
|
||||
|
||||
send_cmd(bi->GetUID(), "IDLE %s %ld %ld", source.c_str(), static_cast<long>(start_time), static_cast<long>(time(NULL) - bi->lastmsg));
|
||||
send_cmd(bi ? bi->GetUID() : av[0], "IDLE %s %ld %ld", source.c_str(), static_cast<long>(start_time), bi ? (static_cast<long>(time(NULL) - bi->lastmsg)) : 0);
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
@@ -149,9 +147,9 @@ class InspIRCdProto : public IRCDProto
|
||||
send_cmd(bi ? bi->GetUID() : TS6SID, "MODE %s %s", u->GetUID().c_str(), buf.c_str());
|
||||
}
|
||||
|
||||
void SendClientIntroduction(const Anope::string &nick, const Anope::string &user, const Anope::string &host, const Anope::string &real, const Anope::string &modes, const Anope::string &uid)
|
||||
void SendClientIntroduction(const User *u, const Anope::string &modes)
|
||||
{
|
||||
send_cmd(TS6SID, "UID %s %ld %s %s %s %s 0.0.0.0 %ld %s :%s", uid.c_str(), static_cast<long>(time(NULL)), nick.c_str(), host.c_str(), host.c_str(), user.c_str(), static_cast<long>(time(NULL)), modes.c_str(), real.c_str());
|
||||
send_cmd(TS6SID, "UID %s %ld %s %s %s %s 0.0.0.0 %ld %s :%s", u->GetUID().c_str(), u->timestamp, u->nick.c_str(), u->host.c_str(), u->host.c_str(), u->GetIdent().c_str(), u->my_signon, modes.c_str(), u->realname.c_str());
|
||||
}
|
||||
|
||||
void SendKickInternal(const BotInfo *source, const Channel *chan, const User *user, const Anope::string &buf)
|
||||
|
||||
@@ -73,10 +73,8 @@ void inspircd_cmd_chghost(const Anope::string &nick, const Anope::string &vhost)
|
||||
int anope_event_idle(const Anope::string &source, int ac, const char **av)
|
||||
{
|
||||
BotInfo *bi = findbot(av[0]);
|
||||
if (!bi)
|
||||
return MOD_CONT;
|
||||
|
||||
send_cmd(bi->GetUID(), "IDLE %s %ld %ld", source.c_str(), static_cast<long>(start_time), static_cast<long>(time(NULL) - bi->lastmsg));
|
||||
send_cmd(bi ? bi->GetUID() : av[0], "IDLE %s %ld %ld", source.c_str(), static_cast<long>(start_time), bi ? (static_cast<long>(time(NULL) - bi->lastmsg)) : 0);
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
@@ -147,9 +145,9 @@ class InspIRCdProto : public IRCDProto
|
||||
send_cmd(bi ? bi->GetUID() : TS6SID, "MODE %s %s", u->GetUID().c_str(), buf.c_str());
|
||||
}
|
||||
|
||||
void SendClientIntroduction(const Anope::string &nick, const Anope::string &user, const Anope::string &host, const Anope::string &real, const Anope::string &modes, const Anope::string &uid)
|
||||
void SendClientIntroduction(const User *u, const Anope::string &modes)
|
||||
{
|
||||
send_cmd(TS6SID, "UID %s %ld %s %s %s %s 0.0.0.0 %ld %s :%s", uid.c_str(), static_cast<long>(time(NULL)), nick.c_str(), host.c_str(), host.c_str(), user.c_str(), static_cast<long>(time(NULL)), modes.c_str(), real.c_str());
|
||||
send_cmd(TS6SID, "UID %s %ld %s %s %s %s 0.0.0.0 %ld %s :%s", u->GetUID().c_str(), u->timestamp, u->nick.c_str(), u->host.c_str(), u->host.c_str(), u->GetIdent().c_str(), u->my_signon, modes.c_str(), u->realname.c_str());
|
||||
}
|
||||
|
||||
void SendKickInternal(const BotInfo *source, const Channel *chan, const User *user, const Anope::string &buf)
|
||||
|
||||
@@ -175,10 +175,10 @@ class RatboxProto : public IRCDProto
|
||||
ratbox_cmd_svinfo();
|
||||
}
|
||||
|
||||
void SendClientIntroduction(const Anope::string &nick, const Anope::string &user, const Anope::string &host, const Anope::string &real, const Anope::string &modes, const Anope::string &uid)
|
||||
void SendClientIntroduction(const User *u, const Anope::string &modes)
|
||||
{
|
||||
EnforceQlinedNick(nick, "");
|
||||
send_cmd(TS6SID, "UID %s 1 %ld %s %s %s 0 %s :%s", nick.c_str(), static_cast<long>(time(NULL)), modes.c_str(), user.c_str(), host.c_str(), uid.c_str(), real.c_str());
|
||||
EnforceQlinedNick(u->nick, "");
|
||||
send_cmd(TS6SID, "UID %s 1 %ld %s %s %s 0 %s :%s", u->nick.c_str(), u->timestamp, modes.c_str(), u->GetIdent().c_str(), u->host.c_str(), u->GetUID().c_str(), u->realname.c_str());
|
||||
}
|
||||
|
||||
void SendPartInternal(const BotInfo *bi, const Channel *chan, const Anope::string &buf)
|
||||
@@ -223,15 +223,6 @@ class RatboxProto : public IRCDProto
|
||||
send_cmd("", "NOTICE @%s :%s", dest->name.c_str(), buf.c_str());
|
||||
}
|
||||
|
||||
/* QUIT */
|
||||
void SendQuitInternal(BotInfo *bi, const Anope::string &buf)
|
||||
{
|
||||
if (!buf.empty())
|
||||
send_cmd(bi->GetUID(), "QUIT :%s", buf.c_str());
|
||||
else
|
||||
send_cmd(bi->GetUID(), "QUIT");
|
||||
}
|
||||
|
||||
/* INVITE */
|
||||
void SendInvite(BotInfo *source, const Anope::string &chan, const Anope::string &nick)
|
||||
{
|
||||
|
||||
@@ -171,10 +171,10 @@ class UnrealIRCdProto : public IRCDProto
|
||||
send_cmd(bi ? bi->nick : Config->ServerName, "v %s %s", u->nick.c_str(), buf.c_str());
|
||||
}
|
||||
|
||||
void SendClientIntroduction(const Anope::string &nick, const Anope::string &user, const Anope::string &host, const Anope::string &real, const Anope::string &modes, const Anope::string &)
|
||||
void SendClientIntroduction(const User *u, const Anope::string &modes)
|
||||
{
|
||||
EnforceQlinedNick(nick, Config->ServerName);
|
||||
send_cmd("", "& %s 1 %ld %s %s %s 0 %s %s * :%s", nick.c_str(), static_cast<long>(time(NULL)), user.c_str(), host.c_str(), Config->ServerName.c_str(), modes.c_str(), host.c_str(), real.c_str());
|
||||
EnforceQlinedNick(u->nick, Config->ServerName);
|
||||
send_cmd("", "& %s 1 %ld %s %s %s 0 %s %s * :%s", u->nick.c_str(), u->timestamp, u->GetIdent().c_str(), u->host.c_str(), Config->ServerName.c_str(), modes.c_str(), u->host.c_str(), u->realname.c_str());
|
||||
}
|
||||
|
||||
void SendKickInternal(const BotInfo *source, const Channel *chan, const User *user, const Anope::string &buf)
|
||||
|
||||
Reference in New Issue
Block a user