From fa3b74a5b49ca7a2c42387bb7b5aa24e09c369d6 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 20 Aug 2011 00:50:26 -0400 Subject: Fixed zlines to only add the xline host, fixed db_mysql's write function, and prevent adding multiple of the same nick to access lists --- modules/protocol/bahamut.cpp | 8 ++++---- modules/protocol/inspircd-ts6.h | 4 ++-- modules/protocol/inspircd11.cpp | 4 ++-- modules/protocol/unreal.cpp | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) (limited to 'modules/protocol') diff --git a/modules/protocol/bahamut.cpp b/modules/protocol/bahamut.cpp index 438703b78..880d10a3a 100644 --- a/modules/protocol/bahamut.cpp +++ b/modules/protocol/bahamut.cpp @@ -117,18 +117,18 @@ class BahamutIRCdProto : public IRCDProto void SendSZLineDel(const XLine *x) { /* this will likely fail so its only here for legacy */ - send_cmd("", "UNSZLINE 0 %s", x->Mask.c_str()); + send_cmd("", "UNSZLINE 0 %s", x->GetHost().c_str()); /* this is how we are supposed to deal with it */ - send_cmd("", "RAKILL %s *", x->Mask.c_str()); + send_cmd("", "RAKILL %s *", x->GetHost().c_str()); } /* SZLINE */ 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()); + send_cmd("", "SZLINE %s :%s", x->GetHost().c_str(), x->Reason.c_str()); /* this is how we are supposed to deal with it */ - send_cmd("", "AKILL %s * %d %s %ld :%s", x->Mask.c_str(), 172800, x->By.c_str(), static_cast(Anope::CurTime), x->Reason.c_str()); + send_cmd("", "AKILL %s * %d %s %ld :%s", x->GetHost().c_str(), 172800, x->By.c_str(), static_cast(Anope::CurTime), x->Reason.c_str()); } /* SVSNOOP */ diff --git a/modules/protocol/inspircd-ts6.h b/modules/protocol/inspircd-ts6.h index e4d9995b3..bb2c1cc9a 100644 --- a/modules/protocol/inspircd-ts6.h +++ b/modules/protocol/inspircd-ts6.h @@ -200,13 +200,13 @@ class InspIRCdTS6Proto : public IRCDProto /* UNSZLINE */ void SendSZLineDel(const XLine *x) { - send_cmd(Config->Numeric, "DELLINE Z %s", x->Mask.c_str()); + send_cmd(Config->Numeric, "DELLINE Z %s", x->GetHost().c_str()); } /* SZLINE */ 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(Anope::CurTime), x->Reason.c_str()); + send_cmd(Config->Numeric, "ADDLINE Z %s %s %ld 0 :%s", x->GetHost().c_str(), x->By.c_str(), static_cast(Anope::CurTime), x->Reason.c_str()); } void SendSVSJoin(const Anope::string &source, const Anope::string &nick, const Anope::string &chan, const Anope::string &) diff --git a/modules/protocol/inspircd11.cpp b/modules/protocol/inspircd11.cpp index 742c2dc88..a5f8e1d86 100644 --- a/modules/protocol/inspircd11.cpp +++ b/modules/protocol/inspircd11.cpp @@ -239,13 +239,13 @@ class InspIRCdProto : public IRCDProto /* UNSZLINE */ void SendSZLineDel(const XLine *x) { - send_cmd(Config->OperServ, "ZLINE %s", x->Mask.c_str()); + send_cmd(Config->OperServ, "ZLINE %s", x->GetHost().c_str()); } /* SZLINE */ 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(Anope::CurTime), x->Reason.c_str()); + send_cmd(Config->ServerName, "ADDLINE Z %s %s %ld 0 :%s", x->GetHost().c_str(), x->By.c_str(), static_cast(Anope::CurTime), x->Reason.c_str()); } void SendSVSJoin(const Anope::string &source, const Anope::string &nick, const Anope::string &chan, const Anope::string &) diff --git a/modules/protocol/unreal.cpp b/modules/protocol/unreal.cpp index 29ad1e1cd..902309267 100644 --- a/modules/protocol/unreal.cpp +++ b/modules/protocol/unreal.cpp @@ -259,13 +259,13 @@ class UnrealIRCdProto : public IRCDProto /* UNSZLINE */ void SendSZLineDel(const XLine *x) { - send_cmd("", "BD - Z * %s %s", x->Mask.c_str(), Config->OperServ.c_str()); + send_cmd("", "BD - Z * %s %s", x->GetHost().c_str(), Config->OperServ.c_str()); } /* SZLINE */ 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(Anope::CurTime + 172800), static_cast(Anope::CurTime), x->Reason.c_str()); + send_cmd("", "BD + Z * %s %s %ld %ld :%s", x->GetHost().c_str(), x->By.c_str(), static_cast(Anope::CurTime + 172800), static_cast(Anope::CurTime), x->Reason.c_str()); } /* SGLINE */ -- cgit