mirror of
https://github.com/anope/anope.git
synced 2026-07-05 05:53:13 +02:00
Moved some global functions to be member functions and misc cleanup
This commit is contained in:
@@ -212,7 +212,8 @@ class BahamutIRCdProto : public IRCDProto
|
||||
|
||||
void SendClientIntroduction(const User *u, const Anope::string &modes)
|
||||
{
|
||||
EnforceQlinedNick(u->nick, Config->s_BotServ);
|
||||
XLine x(u->nick, "Reserved for services");
|
||||
ircdproto->SendSQLine(NULL, &x);
|
||||
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());
|
||||
}
|
||||
|
||||
@@ -248,7 +249,10 @@ class BahamutIRCdProto : public IRCDProto
|
||||
|
||||
void SendChannel(Channel *c)
|
||||
{
|
||||
send_cmd("", "SJOIN %ld %s %s :", static_cast<long>(c->creation_time), c->name.c_str(), get_mlock_modes(c->ci, true).c_str());
|
||||
Anope::string modes = c->GetModes(true, true);
|
||||
if (modes.empty())
|
||||
modes = "+";
|
||||
send_cmd("", "SJOIN %ld %s %s :", static_cast<long>(c->creation_time), c->name.c_str(), modes.c_str());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -244,7 +244,10 @@ class InspIRCdTS6Proto : public IRCDProto
|
||||
|
||||
void SendChannel(Channel *c)
|
||||
{
|
||||
send_cmd(Config->Numeric, "FJOIN %s %ld %s :", c->name.c_str(), static_cast<long>(c->creation_time), get_mlock_modes(c->ci, true).c_str());
|
||||
Anope::string modes = c->GetModes(true, true);
|
||||
if (modes.empty())
|
||||
modes = "+";
|
||||
send_cmd(Config->Numeric, "FJOIN %s %ld %s :", c->name.c_str(), static_cast<long>(c->creation_time), modes.c_str());
|
||||
}
|
||||
|
||||
bool IsNickValid(const Anope::string &nick)
|
||||
|
||||
@@ -166,7 +166,8 @@ class PlexusProto : public IRCDProto
|
||||
|
||||
void SendClientIntroduction(const User *u, const Anope::string &modes)
|
||||
{
|
||||
EnforceQlinedNick(u->nick, "");
|
||||
XLine x(u->nick, "Reserved for services");
|
||||
ircdproto->SendSQLine(NULL, &x);
|
||||
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());
|
||||
}
|
||||
|
||||
@@ -228,7 +229,10 @@ class PlexusProto : public IRCDProto
|
||||
|
||||
void SendChannel(Channel *c)
|
||||
{
|
||||
send_cmd(Config->Numeric, "SJOIN %ld %s %s :", static_cast<long>(c->creation_time), c->name.c_str(), get_mlock_modes(c->ci, true).c_str());
|
||||
Anope::string modes = c->GetModes(true, true);
|
||||
if (modes.empty())
|
||||
modes = "+";
|
||||
send_cmd(Config->Numeric, "SJOIN %ld %s %s :", static_cast<long>(c->creation_time), c->name.c_str(), modes.c_str());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -169,7 +169,8 @@ class RatboxProto : public IRCDProto
|
||||
|
||||
void SendClientIntroduction(const User *u, const Anope::string &modes)
|
||||
{
|
||||
EnforceQlinedNick(u->nick, "");
|
||||
XLine x(u->nick, "Reserved for services");
|
||||
ircdproto->SendSQLine(NULL, &x);
|
||||
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());
|
||||
}
|
||||
|
||||
@@ -223,7 +224,10 @@ class RatboxProto : public IRCDProto
|
||||
|
||||
void SendChannel(Channel *c)
|
||||
{
|
||||
send_cmd("", "SJOIN %ld %s %s :", static_cast<long>(c->creation_time), c->name.c_str(), get_mlock_modes(c->ci, true).c_str());
|
||||
Anope::string modes = c->GetModes(true, true);
|
||||
if (modes.empty())
|
||||
modes = "+";
|
||||
send_cmd("", "SJOIN %ld %s %s :", static_cast<long>(c->creation_time), c->name.c_str(), modes.c_str());
|
||||
}
|
||||
|
||||
bool IsNickValid(const Anope::string &nick)
|
||||
|
||||
@@ -141,7 +141,8 @@ class UnrealIRCdProto : public IRCDProto
|
||||
|
||||
void SendClientIntroduction(const User *u, const Anope::string &modes)
|
||||
{
|
||||
EnforceQlinedNick(u->nick, Config->ServerName);
|
||||
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());
|
||||
}
|
||||
|
||||
@@ -513,7 +514,7 @@ class Unreal32IRCdMessage : public IRCdMessage
|
||||
else if (params.size() == 11)
|
||||
{
|
||||
Anope::string decoded_ip;
|
||||
b64_decode(params[9], decoded_ip);
|
||||
Anope::B64Decode(params[9], decoded_ip);
|
||||
|
||||
sockaddrs ip;
|
||||
ip.ntop(params[9].length() == 8 ? AF_INET : AF_INET6, decoded_ip.c_str());
|
||||
|
||||
Reference in New Issue
Block a user