summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-09-10 15:46:19 -0400
committerAdam <Adam@anope.org>2010-09-10 15:46:19 -0400
commit9eb7562bee7f2a52cf91b0ab0ebc10351f2a46f2 (patch)
tree1dcc4928486a08643af70f69f094ab44c41642e5 /modules
parent46813ccb8c6ab572b8a9ff0a39afb1d92dc4482b (diff)
Fixed bug #1187 - Fixed releasing enforcer clients on TS6 IRCds
Diffstat (limited to 'modules')
-rw-r--r--modules/core/bs_bot.cpp2
-rw-r--r--modules/extra/m_dnsbl.cpp3
-rw-r--r--modules/protocol/bahamut.cpp6
-rw-r--r--modules/protocol/inspircd11.cpp6
-rw-r--r--modules/protocol/inspircd12.cpp8
-rw-r--r--modules/protocol/inspircd20.cpp8
-rw-r--r--modules/protocol/ratbox.cpp15
-rw-r--r--modules/protocol/unreal32.cpp6
8 files changed, 22 insertions, 32 deletions
diff --git a/modules/core/bs_bot.cpp b/modules/core/bs_bot.cpp
index 5c96ac70c..7054ed479 100644
--- a/modules/core/bs_bot.cpp
+++ b/modules/core/bs_bot.cpp
@@ -256,7 +256,7 @@ class CommandBSBot : public Command
if (!user.empty())
{
- ircdproto->SendClientIntroduction(bi->nick, bi->GetIdent(), bi->host, bi->realname, ircd->pseudoclient_mode, bi->GetUID());
+ ircdproto->SendClientIntroduction(bi, ircd->pseudoclient_mode);
XLine x(bi->nick, "Reserved for services");
ircdproto->SendSQLine(&x);
bi->RejoinAll();
diff --git a/modules/extra/m_dnsbl.cpp b/modules/extra/m_dnsbl.cpp
index cecff84a8..ac95c5e30 100644
--- a/modules/extra/m_dnsbl.cpp
+++ b/modules/extra/m_dnsbl.cpp
@@ -54,6 +54,9 @@ class ModuleDNSBL : public Module
public:
ModuleDNSBL(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
+ this->SetAuthor("Anope");
+ this->SetType(SUPPORTED);
+
OnReload(false);
Implementation i[] = { I_OnReload, I_OnPreUserConnect };
diff --git a/modules/protocol/bahamut.cpp b/modules/protocol/bahamut.cpp
index 9938d33c7..5707c642d 100644
--- a/modules/protocol/bahamut.cpp
+++ b/modules/protocol/bahamut.cpp
@@ -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 */
diff --git a/modules/protocol/inspircd11.cpp b/modules/protocol/inspircd11.cpp
index 042814465..d5cacb6a6 100644
--- a/modules/protocol/inspircd11.cpp
+++ b/modules/protocol/inspircd11.cpp
@@ -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)
diff --git a/modules/protocol/inspircd12.cpp b/modules/protocol/inspircd12.cpp
index 0fec91e25..4f2525a11 100644
--- a/modules/protocol/inspircd12.cpp
+++ b/modules/protocol/inspircd12.cpp
@@ -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)
diff --git a/modules/protocol/inspircd20.cpp b/modules/protocol/inspircd20.cpp
index 4445b82b9..a9cc2e9bd 100644
--- a/modules/protocol/inspircd20.cpp
+++ b/modules/protocol/inspircd20.cpp
@@ -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)
diff --git a/modules/protocol/ratbox.cpp b/modules/protocol/ratbox.cpp
index d43a80b52..2aa528f49 100644
--- a/modules/protocol/ratbox.cpp
+++ b/modules/protocol/ratbox.cpp
@@ -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)
{
diff --git a/modules/protocol/unreal32.cpp b/modules/protocol/unreal32.cpp
index fb12892e2..abb83adce 100644
--- a/modules/protocol/unreal32.cpp
+++ b/modules/protocol/unreal32.cpp
@@ -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)