1
0
mirror of https://github.com/anope/anope.git synced 2026-07-10 11:43:15 +02:00

Made akills work on IRCds that do not support bans (ngircd)

This commit is contained in:
Adam
2011-02-27 16:47:23 -05:00
parent f234a2bfab
commit bcaf406747
17 changed files with 87 additions and 84 deletions
+4 -4
View File
@@ -99,7 +99,7 @@ class BahamutIRCdProto : public IRCDProto
}
/* SQLINE */
void SendSQLine(const XLine *x)
void SendSQLine(User *, const XLine *x)
{
send_cmd("", "SQLINE %s :%s", x->Mask.c_str(), x->Reason.c_str());
}
@@ -120,7 +120,7 @@ class BahamutIRCdProto : public IRCDProto
}
/* SZLINE */
void SendSZLine(const XLine *x)
void SendSZLine(User *, const XLine *x)
{
/* this will likely fail so its only here for legacy */
send_cmd("", "SZLINE %s :%s", x->Mask.c_str(), x->Reason.c_str());
@@ -135,7 +135,7 @@ class BahamutIRCdProto : public IRCDProto
}
/* SGLINE */
void SendSGLine(const XLine *x)
void SendSGLine(User *, const XLine *x)
{
send_cmd("", "SGLINE %d :%s:%s", static_cast<int>(x->Mask.length()), x->Mask.c_str(), x->Reason.c_str());
}
@@ -168,7 +168,7 @@ class BahamutIRCdProto : public IRCDProto
c->SetMode(user, static_cast<ChannelModeName>(i), user->nick, false);
}
void SendAkill(const XLine *x)
void SendAkill(User *, const XLine *x)
{
// Calculate the time left before this would expire, capping it at 2 days
time_t timeleft = x->Expires - Anope::CurTime;
+3 -3
View File
@@ -51,7 +51,7 @@ class InspIRCdTS6Proto : public IRCDProto
this->SendChgIdentInternal(u->nick, u->GetIdent());
}
void SendAkill(const XLine *x)
void SendAkill(User *, const XLine *x)
{
// Calculate the time left before this would expire, capping it at 2 days
time_t timeleft = x->Expires - Anope::CurTime;
@@ -125,7 +125,7 @@ class InspIRCdTS6Proto : public IRCDProto
}
/* SQLINE */
void SendSQLine(const XLine *x)
void SendSQLine(User *, const XLine *x)
{
send_cmd(Config->Numeric, "ADDLINE Q %s %s %ld 0 :%s", x->Mask.c_str(), Config->s_OperServ.c_str(), static_cast<long>(Anope::CurTime), x->Reason.c_str());
}
@@ -172,7 +172,7 @@ class InspIRCdTS6Proto : public IRCDProto
}
/* SZLINE */
void SendSZLine(const XLine *x)
void SendSZLine(User *, const XLine *x)
{
send_cmd(Config->Numeric, "ADDLINE Z %s %s %ld 0 :%s", x->Mask.c_str(), x->By.c_str(), static_cast<long>(Anope::CurTime), x->Reason.c_str());
}
+3 -3
View File
@@ -99,7 +99,7 @@ class InspIRCdProto : public IRCDProto
inspircd_cmd_chgident(u->nick, u->GetIdent());
}
void SendAkill(const XLine *x)
void SendAkill(User *, const XLine *x)
{
// Calculate the time left before this would expire, capping it at 2 days
time_t timeleft = x->Expires - Anope::CurTime;
@@ -170,7 +170,7 @@ class InspIRCdProto : public IRCDProto
}
/* SQLINE */
void SendSQLine(const XLine *x)
void SendSQLine(User *, const XLine *x)
{
send_cmd(Config->ServerName, "ADDLINE Q %s %s %ld 0 :%s", x->Mask.c_str(), Config->s_OperServ.c_str(), static_cast<long>(Anope::CurTime), x->Reason.c_str());
}
@@ -231,7 +231,7 @@ class InspIRCdProto : public IRCDProto
}
/* SZLINE */
void SendSZLine(const XLine *x)
void SendSZLine(User *, const XLine *x)
{
send_cmd(Config->ServerName, "ADDLINE Z %s %s %ld 0 :%s", x->Mask.c_str(), x->By.c_str(), static_cast<long>(Anope::CurTime), x->Reason.c_str());
}
+9 -6
View File
@@ -18,7 +18,7 @@ IRCDVar myIrcd[] = {
0, /* SVSNICK */
0, /* Vhost */
0, /* Supports SNlines */
1, /* Supports SQlines */
0, /* Supports SQlines */
0, /* Supports SZlines */
0, /* Join 2 Message */
0, /* Chan SQlines */
@@ -42,12 +42,15 @@ IRCDVar myIrcd[] = {
/* PASS */
class ngIRCdProto : public IRCDProto
{
void SendAkill(const XLine *x) { }
void SendAkill(User *u, const XLine *x)
{
if (SGLine && u == NULL)
for (patricia_tree<User *, ci::ci_char_traits>::iterator it(UserListByNick); it.next();)
if (SGLine->Check(*it) != NULL)
break;
}
void SendAkillDel(const XLine*) { }
void SendSQLine(const XLine*) { }
void SendSQLineDel(const XLine*) { }
void SendSGLine(const XLine *x) { }
void SendSGLineDel(const XLine *x) { }
void SendGlobopsInternal(const BotInfo *source, const Anope::string &buf)
{
+3 -3
View File
@@ -92,7 +92,7 @@ class PlexusProto : public IRCDProto
send_cmd(source ? source->GetUID() : Config->Numeric, "OPERWALL :%s", buf.c_str());
}
void SendSQLine(const XLine *x)
void SendSQLine(User *, const XLine *x)
{
send_cmd(Config->Numeric, "RESV * %s :%s", x->Mask.c_str(), x->Reason.c_str());
}
@@ -103,7 +103,7 @@ class PlexusProto : public IRCDProto
send_cmd(bi ? bi->GetUID() : Config->s_OperServ, "UNXLINE * %s", x->Mask.c_str());
}
void SendSGLine(const XLine *x)
void SendSGLine(User *, const XLine *x)
{
BotInfo *bi = OperServ;
send_cmd(bi ? bi->GetUID() : Config->s_OperServ, "XLINE * %s 0 :%s", x->Mask.c_str(), x->Reason.c_str());
@@ -129,7 +129,7 @@ class PlexusProto : public IRCDProto
c->SetMode(user, static_cast<ChannelModeName>(i), user->nick, false);
}
void SendAkill(const XLine *x)
void SendAkill(User *, const XLine *x)
{
BotInfo *bi = OperServ;
send_cmd(bi ? bi->GetUID() : Config->s_OperServ, "KLINE * %ld %s %s :%s", static_cast<long>(x->Expires - Anope::CurTime), x->GetUser().c_str(), x->GetHost().c_str(), x->Reason.c_str());
+3 -3
View File
@@ -95,7 +95,7 @@ class RatboxProto : public IRCDProto
send_cmd(source ? source->GetUID() : Config->Numeric, "OPERWALL :%s", buf.c_str());
}
void SendSQLine(const XLine *x)
void SendSQLine(User *, const XLine *x)
{
send_cmd(Config->Numeric, "RESV * %s :%s", x->Mask.c_str(), x->Reason.c_str());
}
@@ -106,7 +106,7 @@ class RatboxProto : public IRCDProto
send_cmd(bi ? bi->GetUID() : Config->s_OperServ, "UNXLINE * %s", x->Mask.c_str());
}
void SendSGLine(const XLine *x)
void SendSGLine(User *, const XLine *x)
{
BotInfo *bi = OperServ;
send_cmd(bi ? bi->GetUID() : Config->s_OperServ, "XLINE * %s 0 :%s", x->Mask.c_str(), x->Reason.c_str());
@@ -139,7 +139,7 @@ class RatboxProto : public IRCDProto
}
}
void SendAkill(const XLine *x)
void SendAkill(User *, const XLine *x)
{
BotInfo *bi = OperServ;
send_cmd(bi ? bi->GetUID() : Config->s_OperServ, "KLINE * %ld %s %s :%s", static_cast<long>(x->Expires - Anope::CurTime), x->GetUser().c_str(), x->GetHost().c_str(), x->Reason.c_str());
+4 -4
View File
@@ -113,7 +113,7 @@ class UnrealIRCdProto : public IRCDProto
ModeManager::ProcessModes();
}
void SendAkill(const XLine *x)
void SendAkill(User *, const XLine *x)
{
// Calculate the time left before this would expire, capping it at 2 days
time_t timeleft = x->Expires - Anope::CurTime;
@@ -190,7 +190,7 @@ class UnrealIRCdProto : public IRCDProto
** - Unreal will translate this to TKL for us
**
*/
void SendSQLine(const XLine *x)
void SendSQLine(User *, const XLine *x)
{
send_cmd("", "c %s :%s", x->Mask.c_str(), x->Reason.c_str());
}
@@ -257,7 +257,7 @@ class UnrealIRCdProto : public IRCDProto
}
/* SZLINE */
void SendSZLine(const XLine *x)
void SendSZLine(User *, const XLine *x)
{
send_cmd("", "BD + Z * %s %s %ld %ld :%s", x->Mask.c_str(), x->By.c_str(), static_cast<long>(Anope::CurTime + 172800), static_cast<long>(Anope::CurTime), x->Reason.c_str());
}
@@ -266,7 +266,7 @@ class UnrealIRCdProto : public IRCDProto
/*
* SVSNLINE + reason_where_is_space :realname mask with spaces
*/
void SendSGLine(const XLine *x)
void SendSGLine(User *, const XLine *x)
{
Anope::string edited_reason = x->Reason;
edited_reason = edited_reason.replace_all_cs(" ", "_");