summaryrefslogtreecommitdiff
path: root/src/protocol/inspircd12.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocol/inspircd12.cpp')
-rw-r--r--src/protocol/inspircd12.cpp34
1 files changed, 15 insertions, 19 deletions
diff --git a/src/protocol/inspircd12.cpp b/src/protocol/inspircd12.cpp
index d326b6820..5fa330197 100644
--- a/src/protocol/inspircd12.cpp
+++ b/src/protocol/inspircd12.cpp
@@ -40,7 +40,7 @@ IRCDVar myIrcd[] = {
"+ao", /* Channel Umode used by Botserv bots */
1, /* SVSNICK */
1, /* Vhost */
- 0, /* Supports SGlines */
+ 0, /* Supports SNlines */
1, /* Supports SQlines */
1, /* Supports SZlines */
4, /* Number of server args */
@@ -123,10 +123,10 @@ void inspircd_cmd_pass(const char *pass)
class InspIRCdProto : public IRCDProto
{
- void SendAkillDel(Akill *ak)
+ void SendAkillDel(XLine *x)
{
BotInfo *bi = OperServ;
- send_cmd(bi->uid, "GLINE %s@%s", ak->user, ak->host);
+ send_cmd(bi->uid, "GLINE %s", x->Mask.c_str());
}
void SendTopic(BotInfo *whosets, Channel *c, const char *whosetit, const char *topic)
@@ -147,14 +147,14 @@ class InspIRCdProto : public IRCDProto
}
}
- void SendAkill(Akill *ak)
+ void SendAkill(XLine *x)
{
// Calculate the time left before this would expire, capping it at 2 days
- time_t timeleft = ak->expires - time(NULL);
- if (timeleft > 172800 || !ak->expires)
+ time_t timeleft = x->Expires - time(NULL);
+ if (timeleft > 172800 || !x->Expires)
timeleft = 172800;
BotInfo *bi = OperServ;
- send_cmd(bi->uid, "ADDLINE G %s@%s %s %ld %ld :%s", ak->user, ak->host, ak->by, static_cast<long>(time(NULL)), static_cast<long>(timeleft), ak->reason);
+ send_cmd(bi->uid, "ADDLINE G %s@%s %s %ld %ld :%s", x->GetUser().c_str(), x->GetHost().c_str(), x->By.c_str(), static_cast<long>(time(NULL)), static_cast<long>(timeleft), x->Reason.c_str());
}
void SendSVSKillInternal(BotInfo *source, User *user, const char *buf)
@@ -219,19 +219,15 @@ class InspIRCdProto : public IRCDProto
}
/* UNSQLINE */
- void SendSQLineDel(const std::string &user)
+ void SendSQLineDel(XLine *x)
{
- if (user.empty())
- return;
- send_cmd(TS6SID, "DELLINE Q %s", user.c_str());
+ send_cmd(TS6SID, "DELLINE Q %s", x->Mask.c_str());
}
/* SQLINE */
- void SendSQLine(const std::string &mask, const std::string &reason)
+ void SendSQLine(XLine *x)
{
- if (mask.empty() || reason.empty())
- return;
- send_cmd(TS6SID, "ADDLINE Q %s %s %ld 0 :%s", mask.c_str(), Config.s_OperServ, static_cast<long>(time(NULL)), reason.c_str());
+ send_cmd(TS6SID, "ADDLINE Q %s %s %ld 0 :%s", x->Mask.c_str(), Config.s_OperServ, static_cast<long>(time(NULL)), x->Reason.c_str());
}
/* SQUIT */
@@ -288,15 +284,15 @@ class InspIRCdProto : public IRCDProto
}
/* UNSZLINE */
- void SendSZLineDel(SXLine *sx)
+ void SendSZLineDel(XLine *x)
{
- send_cmd(TS6SID, "DELLINE Z %s", sx->mask);
+ send_cmd(TS6SID, "DELLINE Z %s", x->Mask.c_str());
}
/* SZLINE */
- void SendSZLine(SXLine *sx)
+ void SendSZLine(XLine *x)
{
- send_cmd(TS6SID, "ADDLINE Z %s %s %ld 0 :%s", sx->mask, sx->by, static_cast<long>(time(NULL)), sx->reason);
+ send_cmd(TS6SID, "ADDLINE Z %s %s %ld 0 :%s", x->Mask.c_str(), x->By.c_str(), static_cast<long>(time(NULL)), x->Reason.c_str());
}
/* SVSMODE -r */