mirror of
https://github.com/anope/anope.git
synced 2026-07-10 19:03:13 +02:00
Moved some global functions to be member functions and misc cleanup
This commit is contained in:
@@ -224,16 +224,16 @@ class CommandBSBot : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
/* The new nick is really different, so we remove the Q line for
|
||||
the old nick. */
|
||||
/* The new nick is really different, so we remove the Q line for the old nick. */
|
||||
if (ircd->sqline)
|
||||
{
|
||||
XLine x(bi->nick);
|
||||
ircdproto->SendSQLineDel(&x);
|
||||
}
|
||||
|
||||
/* We check whether user with this nick is online, and kill it if so */
|
||||
EnforceQlinedNick(nick, Config->s_BotServ);
|
||||
/* Add a Q line for the new nick */
|
||||
XLine x(nick, "Reserved for services");
|
||||
ircdproto->SendSQLine(NULL, &x);
|
||||
}
|
||||
|
||||
if (!user.empty())
|
||||
@@ -241,8 +241,6 @@ class CommandBSBot : public Command
|
||||
else
|
||||
{
|
||||
ircdproto->SendChangeBotNick(bi, nick);
|
||||
XLine x(bi->nick, "Reserved for services");
|
||||
ircdproto->SendSQLine(NULL, &x);
|
||||
}
|
||||
|
||||
if (!nick.equals_cs(bi->nick))
|
||||
@@ -258,8 +256,6 @@ class CommandBSBot : public Command
|
||||
if (!user.empty())
|
||||
{
|
||||
ircdproto->SendClientIntroduction(bi, ircd->pseudoclient_mode);
|
||||
XLine x(bi->nick, "Reserved for services");
|
||||
ircdproto->SendSQLine(NULL, &x);
|
||||
bi->RejoinAll();
|
||||
}
|
||||
|
||||
|
||||
@@ -192,10 +192,17 @@ class CommandCSAKick : public Command
|
||||
}
|
||||
|
||||
/* Check excepts BEFORE we get this far */
|
||||
if (ModeManager::FindChannelModeByName(CMODE_EXCEPT) && is_excepted_mask(ci, mask))
|
||||
if (ci->c)
|
||||
{
|
||||
source.Reply(_(CHAN_EXCEPTED), mask.c_str(), ci->name.c_str());
|
||||
return;
|
||||
std::pair<Channel::ModeList::iterator, Channel::ModeList::iterator> modes = ci->c->GetModeList(CMODE_EXCEPT);
|
||||
for (; modes.first != modes.second; ++modes.first)
|
||||
{
|
||||
if (Anope::Match(modes.first->second, mask))
|
||||
{
|
||||
source.Reply(_(CHAN_EXCEPTED), mask.c_str(), ci->name.c_str());
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Check whether target nick has equal/higher access
|
||||
|
||||
@@ -100,7 +100,7 @@ class CommandCSInfo : public Command
|
||||
CheckOptStr(optbuf, CI_NO_EXPIRE, _("No expire"), ci, u->Account());
|
||||
|
||||
source.Reply(_(NICK_INFO_OPTIONS), optbuf.empty() ? _("None") : optbuf.c_str());
|
||||
source.Reply(_(" Mode lock: %s"), get_mlock_modes(ci, 1).c_str());
|
||||
source.Reply(_(" Mode lock: %s"), ci->GetMLockAsString(true).c_str());
|
||||
|
||||
if (!ci->HasFlag(CI_NO_EXPIRE))
|
||||
source.Reply(_(" Expires on: %s"), do_strftime(ci->last_used + Config->CSExpire).c_str());
|
||||
|
||||
@@ -25,7 +25,7 @@ class ENone : public Module
|
||||
{
|
||||
Anope::string buf = "plain:";
|
||||
Anope::string cpass;
|
||||
b64_encode(src, cpass);
|
||||
Anope::B64Encode(src, cpass);
|
||||
buf += cpass;
|
||||
Log(LOG_DEBUG_2) << "(enc_none) hashed password from [" << src << "] to [" << buf << "]";
|
||||
dest = buf;
|
||||
@@ -38,7 +38,7 @@ class ENone : public Module
|
||||
return EVENT_CONTINUE;
|
||||
size_t pos = src.find(':');
|
||||
Anope::string buf = src.substr(pos + 1);
|
||||
b64_decode(buf, dest);
|
||||
Anope::B64Decode(buf, dest);
|
||||
return EVENT_ALLOW;
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ class CommandNSGhost : public Command
|
||||
{
|
||||
Log(LOG_COMMAND, u, this) << "for " << nick;
|
||||
Anope::string buf = "GHOST command used by " + u->nick;
|
||||
kill_user(Config->s_NickServ, user, buf);
|
||||
user->Kill(Config->s_NickServ, buf);
|
||||
source.Reply(_("Ghost with your nick has been killed."), nick.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ class CommandOSNOOP : public Command
|
||||
++it;
|
||||
|
||||
if (u2 && u2->HasMode(UMODE_OPER) && Anope::Match(u2->server->GetName(), server, true))
|
||||
kill_user(Config->s_OperServ, u2, reason);
|
||||
u2->Kill(Config->s_OperServ, reason);
|
||||
}
|
||||
}
|
||||
else if (cmd.equals_ci("REVOKE"))
|
||||
|
||||
@@ -606,7 +606,7 @@ class OSSession : public Module
|
||||
if (!Config->SessionLimitDetailsLoc.empty())
|
||||
u->SendMessage(operserv->Bot(), "%s", Config->SessionLimitDetailsLoc.c_str());
|
||||
|
||||
kill_user(Config->s_OperServ, u, "Session limit exceeded");
|
||||
u->Kill(Config->s_OperServ, "Session limit exceeded");
|
||||
|
||||
++session->hits;
|
||||
if (Config->MaxSessionKill && session->hits >= Config->MaxSessionKill && SGLine)
|
||||
|
||||
Reference in New Issue
Block a user