summaryrefslogtreecommitdiff
path: root/modules/protocol
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-08-12 03:13:56 -0400
committerAdam <Adam@anope.org>2011-08-12 03:13:56 -0400
commitfeee50e6959171123773417caab73ecad3af824b (patch)
treedb23ef04c56f0552e1876e9d9a75d1b3142bca3b /modules/protocol
parent54710a782b49f01a868987227e9b8748d28834cb (diff)
Allow bot usermodes to be configurable
Diffstat (limited to 'modules/protocol')
-rw-r--r--modules/protocol/bahamut.cpp5
-rw-r--r--modules/protocol/inspircd-ts6.h3
-rw-r--r--modules/protocol/inspircd11.cpp3
-rw-r--r--modules/protocol/plexus.cpp5
-rw-r--r--modules/protocol/ratbox.cpp5
-rw-r--r--modules/protocol/unreal.cpp7
6 files changed, 13 insertions, 15 deletions
diff --git a/modules/protocol/bahamut.cpp b/modules/protocol/bahamut.cpp
index 1fca45c39..cecc480f3 100644
--- a/modules/protocol/bahamut.cpp
+++ b/modules/protocol/bahamut.cpp
@@ -214,10 +214,9 @@ class BahamutIRCdProto : public IRCDProto
send_cmd(source->nick, "KICK %s %s", chan->name.c_str(), user->nick.c_str());
}
- void SendClientIntroduction(const User *u, const Anope::string &modes)
+ void SendClientIntroduction(const User *u)
{
- XLine x(u->nick, "Reserved for services");
- ircdproto->SendSQLine(NULL, &x);
+ Anope::string modes = "+" + u->GetModes();
send_cmd("", "NICK %s 1 %ld %s %s %s %s 0 0 :%s", u->nick.c_str(), static_cast<long>(u->timestamp), modes.c_str(), u->GetIdent().c_str(), u->host.c_str(), u->server->GetName().c_str(), u->realname.c_str());
}
diff --git a/modules/protocol/inspircd-ts6.h b/modules/protocol/inspircd-ts6.h
index 2a60062b2..e4d9995b3 100644
--- a/modules/protocol/inspircd-ts6.h
+++ b/modules/protocol/inspircd-ts6.h
@@ -103,8 +103,9 @@ class InspIRCdTS6Proto : public IRCDProto
send_cmd(bi ? bi->GetUID() : Config->Numeric, "MODE %s %s", u->GetUID().c_str(), buf.c_str());
}
- void SendClientIntroduction(const User *u, const Anope::string &modes)
+ void SendClientIntroduction(const User *u)
{
+ Anope::string modes = "+" + u->GetModes();
send_cmd(Config->Numeric, "UID %s %ld %s %s %s %s 0.0.0.0 %ld %s :%s", u->GetUID().c_str(), static_cast<long>(u->timestamp), u->nick.c_str(), u->host.c_str(), u->host.c_str(), u->GetIdent().c_str(), static_cast<long>(u->my_signon), modes.c_str(), u->realname.c_str());
}
diff --git a/modules/protocol/inspircd11.cpp b/modules/protocol/inspircd11.cpp
index effd280c9..4d39c585d 100644
--- a/modules/protocol/inspircd11.cpp
+++ b/modules/protocol/inspircd11.cpp
@@ -135,8 +135,9 @@ class InspIRCdProto : public IRCDProto
send_cmd(bi ? bi->nick : Config->ServerName, "MODE %s %s", u->nick.c_str(), buf.c_str());
}
- void SendClientIntroduction(const User *u, const Anope::string &modes)
+ void SendClientIntroduction(const User *u)
{
+ Anope::string modes = "+" + u->GetModes();
send_cmd(Config->ServerName, "NICK %ld %s %s %s %s %s 0.0.0.0 :%s", static_cast<long>(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");
}
diff --git a/modules/protocol/plexus.cpp b/modules/protocol/plexus.cpp
index 038ed0358..2379dcc27 100644
--- a/modules/protocol/plexus.cpp
+++ b/modules/protocol/plexus.cpp
@@ -168,10 +168,9 @@ class PlexusProto : public IRCDProto
plexus_cmd_svinfo();
}
- void SendClientIntroduction(const User *u, const Anope::string &modes)
+ void SendClientIntroduction(const User *u)
{
- XLine x(u->nick, "Reserved for services");
- ircdproto->SendSQLine(NULL, &x);
+ Anope::string modes = "+" + u->GetModes();
send_cmd(Config->Numeric, "UID %s 1 %ld %s %s %s 255.255.255.255 %s 0 %s :%s", u->nick.c_str(), static_cast<long>(u->timestamp), modes.c_str(), u->GetIdent().c_str(), u->host.c_str(), u->GetUID().c_str(), u->host.c_str(), u->realname.c_str());
}
diff --git a/modules/protocol/ratbox.cpp b/modules/protocol/ratbox.cpp
index e52493aed..516452ce5 100644
--- a/modules/protocol/ratbox.cpp
+++ b/modules/protocol/ratbox.cpp
@@ -168,10 +168,9 @@ class RatboxProto : public IRCDProto
ratbox_cmd_svinfo();
}
- void SendClientIntroduction(const User *u, const Anope::string &modes)
+ void SendClientIntroduction(const User *u)
{
- XLine x(u->nick, "Reserved for services");
- ircdproto->SendSQLine(NULL, &x);
+ Anope::string modes = "+" + u->GetModes();
send_cmd(Config->Numeric, "UID %s 1 %ld %s %s %s 0 %s :%s", u->nick.c_str(), static_cast<long>(u->timestamp), modes.c_str(), u->GetIdent().c_str(), u->host.c_str(), u->GetUID().c_str(), u->realname.c_str());
}
diff --git a/modules/protocol/unreal.cpp b/modules/protocol/unreal.cpp
index 4f8bc5e6f..60419c481 100644
--- a/modules/protocol/unreal.cpp
+++ b/modules/protocol/unreal.cpp
@@ -140,11 +140,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 User *u, const Anope::string &modes)
+ void SendClientIntroduction(const User *u)
{
- XLine x(u->nick, "Reserved for services");
- ircdproto->SendSQLine(NULL, &x);
- send_cmd("", "& %s 1 %ld %s %s %s 0 %s %s * :%s", u->nick.c_str(), static_cast<long>(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());
+ Anope::string modes = "+" + u->GetModes();
+ send_cmd("", "& %s 1 %ld %s %s %s 0 %s %s * :%s", u->nick.c_str(), static_cast<long>(u->timestamp), u->GetIdent().c_str(), u->host.c_str(), u->server->GetName().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)