mirror of
https://github.com/anope/anope.git
synced 2026-06-30 20:46:38 +02:00
Made many of the functions in IRCDProto accept the relative object pointers instea of char* everywhere, and updated TODO
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2706 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
@@ -27,21 +27,20 @@ Legend:
|
||||
[+] General options block, ability to turn LOGCHAN on from the config file..
|
||||
[x] Docs directory cleanup
|
||||
[x] Fix permanent channels support properly
|
||||
[x] CS SET INHABIT to keep pseudoclient in a channel after it empties to maintain banlists and such
|
||||
[x] Set forbidden channels +s
|
||||
[x] SendAkill should just take a pointer to the Akill class instead of millions of fields (same for some other stuff)
|
||||
|
||||
Future
|
||||
------
|
||||
[ ] Move a (lot) of stuff to class members as a defined interface rather than copypasta everywhere (ns_set, ns_saset!)
|
||||
[ ] CS SET INHABIT to keep pseudoclient in a channel after it empties to maintain banlists and such
|
||||
[?] Remote identification (1.9.1? will this break stuff?)
|
||||
[ ] Requires a rejig of how Alias vs Core works
|
||||
[ ] Language charset stuff, including collation (1.9.1? phoenix?)
|
||||
[ ] Add support for +k, +q, etc type umodes
|
||||
[ ] burn do_sjoin with fire
|
||||
[ ] fantasy: allow replies/notifications to fantasy commands to go to the channel via notice
|
||||
[?] a way for a module to queue itself (or even another module) for unloading
|
||||
[ ] add overridden form of SendGlobops accepting BotInfo
|
||||
[ ] SendAkill should just take a pointer to the Akill class instead of millions of fields (same for some other stuff)
|
||||
[ ] chan_set_modes should take BotInfo, possibly with override for User *?
|
||||
[ ] Language system is disgusting, it must die.
|
||||
[ ] Modules should also have a way to add strings programatically
|
||||
[ ] Should be able to add many strings by dropping a file in a set location.
|
||||
@@ -55,7 +54,6 @@ Future
|
||||
[ ] Time added
|
||||
[ ] Time modified
|
||||
[ ] Expiry (useful?)
|
||||
[ ] Set forbidden channels +s
|
||||
[ ] NS INFO: seperate field for last seen realhost, shown to SRA only
|
||||
[ ] NS SUSPEND: show suspender and reason, probably to sopers only (see CS SUSPEND)
|
||||
XXX: is SUSPEND overlapping with OS IGNORE functionality?
|
||||
@@ -77,6 +75,5 @@ Future
|
||||
[ ] Method to list suspended/forbidden nicks/channels?
|
||||
[?] MS IGNORE. Make it take nick (accounts) or n!u@h masks. Fake success of memo send still, but send to opers?
|
||||
[?] More "friendly" date displays of some things like registration time ("November 7th 2006 (2 years, 0 months, 0 days ago)")
|
||||
[?] Review settings like NSModeOnID for whether they actually have a point existing (Rob says it does not - and that it should probably be a nickname setting)
|
||||
[?] OS INJECT
|
||||
[?] Drop CS SET ENTRYMSG, replace with a 'news' type system? (limited to a configured number of items, default 3)
|
||||
|
||||
+23
-23
@@ -1319,17 +1319,17 @@ class ServerConfig;
|
||||
class CoreExport IRCDProto
|
||||
{
|
||||
private:
|
||||
virtual void SendSVSKillInternal(const char *, const char *, const char *) = 0;
|
||||
virtual void SendSVSKillInternal(BotInfo *, User *, const char *) = 0;
|
||||
virtual void SendModeInternal(BotInfo *, const char *, const char *) = 0;
|
||||
virtual void SendModeInternal(User *, const char *) = 0;
|
||||
virtual void SendKickInternal(BotInfo *bi, const char *, const char *, const char *) = 0;
|
||||
virtual void SendNoticeChanopsInternal(BotInfo *bi, const char *, const char *) = 0;
|
||||
virtual void SendKickInternal(BotInfo *, Channel *, User *, const char *) = 0;
|
||||
virtual void SendNoticeChanopsInternal(BotInfo *bi, Channel *, const char *) = 0;
|
||||
virtual void SendMessageInternal(BotInfo *bi, const char *dest, const char *buf);
|
||||
virtual void SendNoticeInternal(BotInfo *bi, const char *dest, const char *msg);
|
||||
virtual void SendPrivmsgInternal(BotInfo *bi, const char *dest, const char *buf);
|
||||
virtual void SendQuitInternal(BotInfo *bi, const char *buf);
|
||||
virtual void SendPartInternal(BotInfo *bi, const char *chan, const char *buf);
|
||||
virtual void SendGlobopsInternal(const char *source, const char *buf);
|
||||
virtual void SendPartInternal(BotInfo *bi, Channel *chan, const char *buf);
|
||||
virtual void SendGlobopsInternal(BotInfo *source, const char *buf);
|
||||
virtual void SendCTCPInternal(BotInfo *bi, const char *dest, const char *buf);
|
||||
virtual void SendNumericInternal(const char *source, int numeric, const char *dest, const char *buf);
|
||||
public:
|
||||
@@ -1337,23 +1337,23 @@ class CoreExport IRCDProto
|
||||
virtual ~IRCDProto() { }
|
||||
|
||||
virtual void SendSVSNOOP(const char *, int) { }
|
||||
virtual void SendAkillDel(const char *, const char *) = 0;
|
||||
virtual void SendTopic(BotInfo *, const char *, const char *, const char *, time_t) = 0;
|
||||
virtual void SendTopic(BotInfo *, Channel *, const char *, const char *) = 0;
|
||||
virtual void SendVhostDel(User *) { }
|
||||
virtual void SendAkill(const char *, const char *, const char *, time_t, time_t, const char *) = 0;
|
||||
virtual void SendSVSKill(const char *source, const char *user, const char *fmt, ...);
|
||||
virtual void SendAkill(Akill *) = 0;
|
||||
virtual void SendAkillDel(Akill *) = 0;
|
||||
virtual void SendSVSKill(BotInfo *source, User *user, const char *fmt, ...);
|
||||
virtual void SendSVSMode(User *, int, const char **) = 0;
|
||||
virtual void SendMode(BotInfo *bi, const char *dest, const char *fmt, ...);
|
||||
virtual void SendMode(User *u, const char *fmt, ...);
|
||||
virtual void SendClientIntroduction(const char *, const char *, const char *, const char *, const char *, const char *uid) = 0;
|
||||
virtual void SendKick(BotInfo *bi, const char *chan, const char *user, const char *fmt, ...);
|
||||
virtual void SendNoticeChanops(BotInfo *bi, const char *dest, const char *fmt, ...);
|
||||
virtual void SendKick(BotInfo *bi, Channel *chan, User *user, const char *fmt, ...);
|
||||
virtual void SendNoticeChanops(BotInfo *bi, Channel *dest, const char *fmt, ...);
|
||||
virtual void SendMessage(BotInfo *bi, const char *dest, const char *fmt, ...);
|
||||
virtual void SendNotice(BotInfo *bi, const char *dest, const char *fmt, ...);
|
||||
virtual void SendAction(BotInfo *bi, const char *dest, const char *fmt, ...);
|
||||
virtual void SendPrivmsg(BotInfo *bi, const char *dest, const char *fmt, ...);
|
||||
virtual void SendGlobalNotice(BotInfo *bi, const char *dest, const char *msg);
|
||||
virtual void SendGlobalPrivmsg(BotInfo *bi, const char *dest, const char *msg);
|
||||
virtual void SendGlobalNotice(BotInfo *bi, Server *dest, const char *msg);
|
||||
virtual void SendGlobalPrivmsg(BotInfo *bi, Server *desc, const char *msg);
|
||||
|
||||
/** XXX: This is a hack for NickServ enforcers. It is deprecated.
|
||||
* If I catch any developer using this in new code, I will RIP YOUR BALLS OFF.
|
||||
@@ -1366,23 +1366,23 @@ class CoreExport IRCDProto
|
||||
virtual void SendJoin(BotInfo *bi, const char *, time_t) = 0;
|
||||
virtual void SendSQLineDel(const char *) = 0;
|
||||
virtual void SendInvite(BotInfo *bi, const char *chan, const char *nick);
|
||||
virtual void SendPart(BotInfo *bi, const char *chan, const char *fmt, ...);
|
||||
virtual void SendGlobops(const char *source, const char *fmt, ...);
|
||||
virtual void SendPart(BotInfo *bi, Channel *chan, const char *fmt, ...);
|
||||
virtual void SendGlobops(BotInfo *source, const char *fmt, ...);
|
||||
virtual void SendSQLine(const char *, const char *) = 0;
|
||||
virtual void SendSquit(const char *servname, const char *message);
|
||||
virtual void SendSVSO(const char *, const char *, const char *) { }
|
||||
virtual void SendChangeBotNick(BotInfo *bi, const char *newnick);
|
||||
virtual void SendForceNickChange(const char *oldnick, const char *newnick, time_t when);
|
||||
virtual void SendVhost(const char *, const char *, const char *) { }
|
||||
virtual void SendForceNickChange(User *u, const char *newnick, time_t when);
|
||||
virtual void SendVhost(User *, const char *, const char *) { }
|
||||
virtual void SendConnect() = 0;
|
||||
virtual void SendSVSHold(const char *) { }
|
||||
virtual void SendSVSHoldDel(const char *) { }
|
||||
virtual void SendSGLineDel(const char *) { }
|
||||
virtual void SendSZLineDel(const char *) { }
|
||||
virtual void SendSZLine(const char *, const char *, const char *) { }
|
||||
virtual void SendSGLine(const char *, const char *) { }
|
||||
virtual void SendBanDel(const char *, const char *) { }
|
||||
virtual void SendSVSModeChan(const char *, const char *, const char *) { }
|
||||
virtual void SendSGLineDel(SXLine *) { }
|
||||
virtual void SendSZLineDel(SXLine *) { }
|
||||
virtual void SendSZLine(SXLine *) { }
|
||||
virtual void SendSGLine(SXLine *) { }
|
||||
virtual void SendBanDel(Channel *, const char *) { }
|
||||
virtual void SendSVSModeChan(Channel *, const char *, const char *) { }
|
||||
virtual void SendUnregisteredNick(User *) { }
|
||||
virtual void SendCTCP(BotInfo *bi, const char *dest, const char *fmt, ...);
|
||||
virtual void SendSVSJoin(const char *, const char *, const char *, const char *) { }
|
||||
|
||||
+3
-4
@@ -65,7 +65,7 @@ void kill_user(const char *source, const char *user, const char *reason)
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s (%s)", source, reason);
|
||||
|
||||
ircdproto->SendSVSKill(source, user, buf);
|
||||
ircdproto->SendSVSKill(findbot(source), finduser(user), buf);
|
||||
|
||||
if (!ircd->quitonkill && finduser(user)) {
|
||||
do_kill(user, buf);
|
||||
@@ -106,8 +106,7 @@ void sqline(char *mask, char *reason)
|
||||
av[0] = c->name;
|
||||
av[1] = cu->user->nick;
|
||||
av[2] = reason;
|
||||
ircdproto->SendKick(findbot(Config.s_OperServ), av[0], av[1],
|
||||
"Q-Lined: %s", av[2]);
|
||||
ircdproto->SendKick(findbot(Config.s_OperServ), c, cu->user, "Q-Lined: %s", av[2]);
|
||||
do_kick(Config.s_ChanServ, 3, av);
|
||||
}
|
||||
}
|
||||
@@ -161,7 +160,7 @@ void common_unban(ChannelInfo * ci, char *nick)
|
||||
ip = str_is_ip(host);
|
||||
|
||||
if (ircd->svsmode_unban)
|
||||
ircdproto->SendBanDel(ci->name, nick);
|
||||
ircdproto->SendBanDel(ci->c, nick);
|
||||
else
|
||||
{
|
||||
for (ban = ci->c->bans->entries; ban; ban = next)
|
||||
|
||||
+2
-2
@@ -167,9 +167,9 @@ void BotInfo::UnAssign(User *u, ChannelInfo *ci)
|
||||
if (ci->c && ci->c->usercount >= Config.BSMinUsers)
|
||||
{
|
||||
if (u)
|
||||
ircdproto->SendPart(ci->bi, ci->name, "UNASSIGN from %s", u->nick);
|
||||
ircdproto->SendPart(ci->bi, ci->c, "UNASSIGN from %s", u->nick);
|
||||
else
|
||||
ircdproto->SendPart(ci->bi, ci->name, "");
|
||||
ircdproto->SendPart(ci->bi, ci->c, "");
|
||||
}
|
||||
|
||||
ci->bi->chancount--;
|
||||
|
||||
+6
-8
@@ -644,7 +644,7 @@ void bot_join(ChannelInfo * ci)
|
||||
/* Should we be invited? */
|
||||
if (ci->c->HasMode(CMODE_INVITE)
|
||||
|| (limit && ci->c->usercount >= limit))
|
||||
ircdproto->SendNoticeChanops(ci->bi, ci->c->name,
|
||||
ircdproto->SendNoticeChanops(ci->bi, ci->c,
|
||||
"%s invited %s into the channel.",
|
||||
ci->bi->nick, ci->bi->nick);
|
||||
}
|
||||
@@ -708,7 +708,7 @@ static void bot_kick(ChannelInfo * ci, User * u, int message, ...)
|
||||
av[0] = ci->name;
|
||||
av[1] = u->nick;
|
||||
av[2] = buf;
|
||||
ircdproto->SendKick(ci->bi, av[0], av[1], "%s", av[2]);
|
||||
ircdproto->SendKick(ci->bi, ci->c, u, "%s", av[2]);
|
||||
do_kick(ci->bi->nick, 3, av);
|
||||
FOREACH_MOD(I_OnBotKick, OnBotKick(u, ci, buf));
|
||||
}
|
||||
@@ -765,10 +765,9 @@ void bot_raw_ban(User * requester, ChannelInfo * ci, char *nick,
|
||||
|
||||
/* Check if we need to do a signkick or not -GD */
|
||||
if ((ci->HasFlag(CI_SIGNKICK) || ci->HasFlag(CI_SIGNKICK_LEVEL)) && !check_access(requester, ci, CA_SIGNKICK))
|
||||
ircdproto->SendKick(ci->bi, kav[0], kav[1], "%s (%s)", kav[2],
|
||||
requester->nick);
|
||||
ircdproto->SendKick(ci->bi, ci->c, u, "%s (%s)", kav[2], requester->nick);
|
||||
else
|
||||
ircdproto->SendKick(ci->bi, kav[0], kav[1], "%s", kav[2]);
|
||||
ircdproto->SendKick(ci->bi, ci->c, u, "%s", kav[2]);
|
||||
|
||||
do_kick(ci->bi->nick, 3, kav);
|
||||
FOREACH_MOD(I_OnBotKick, OnBotKick(u, ci, kav[2]));
|
||||
@@ -811,10 +810,9 @@ void bot_raw_kick(User * requester, ChannelInfo * ci, char *nick,
|
||||
}
|
||||
|
||||
if (ci->HasFlag(CI_SIGNKICK) || ((ci->HasFlag(CI_SIGNKICK_LEVEL)) && !check_access(requester, ci, CA_SIGNKICK)))
|
||||
ircdproto->SendKick(ci->bi, av[0], av[1], "%s (%s)", av[2],
|
||||
requester->nick);
|
||||
ircdproto->SendKick(ci->bi, ci->c, u, "%s (%s)", av[2], requester->nick);
|
||||
else
|
||||
ircdproto->SendKick(ci->bi, av[0], av[1], "%s", av[2]);
|
||||
ircdproto->SendKick(ci->bi, ci->c, u, "%s", av[2]);
|
||||
do_kick(ci->bi->nick, 3, av);
|
||||
FOREACH_MOD(I_OnBotKick, OnBotKick(u, ci, av[2]));
|
||||
}
|
||||
|
||||
+8
-8
@@ -319,7 +319,7 @@ void Channel::RemoveModeInternal(ChannelMode *cm, const std::string ¶m, bool
|
||||
{
|
||||
ci->UnsetFlag(CI_PERSIST);
|
||||
if (Config.s_BotServ && ci->bi && usercount == Config.BSMinUsers - 1)
|
||||
ircdproto->SendPart(ci->bi, name, NULL);
|
||||
ircdproto->SendPart(ci->bi, this, NULL);
|
||||
if (!users)
|
||||
delete this;
|
||||
}
|
||||
@@ -735,7 +735,7 @@ void chan_deluser(User * user, Channel * c)
|
||||
return;
|
||||
|
||||
if (Config.s_BotServ && c->ci && c->ci->bi && c->usercount == Config.BSMinUsers - 1)
|
||||
ircdproto->SendPart(c->ci->bi, c->name, NULL);
|
||||
ircdproto->SendPart(c->ci->bi, c, NULL);
|
||||
|
||||
if (!c->users)
|
||||
delete c;
|
||||
@@ -1318,7 +1318,7 @@ void do_sjoin(const char *source, int ac, const char **av)
|
||||
if (c->ci->bi)
|
||||
{
|
||||
/* This is ugly, but it always works */
|
||||
ircdproto->SendPart(c->ci->bi, c->name, "TS reop");
|
||||
ircdproto->SendPart(c->ci->bi, c, "TS reop");
|
||||
bot_join(c->ci);
|
||||
}
|
||||
/* Make sure +r is set */
|
||||
@@ -1425,7 +1425,7 @@ void do_sjoin(const char *source, int ac, const char **av)
|
||||
}
|
||||
|
||||
if (is_sqlined && !is_oper(user)) {
|
||||
ircdproto->SendKick(findbot(Config.s_OperServ), av[1], s, "Q-Lined");
|
||||
ircdproto->SendKick(findbot(Config.s_OperServ), c, user, "Q-Lined");
|
||||
} else {
|
||||
if (!check_kick(user, av[1], ts)) {
|
||||
FOREACH_MOD(I_OnPreJoinChannel, OnPreJoinChannel(user, av[1]));
|
||||
@@ -1511,7 +1511,7 @@ void do_sjoin(const char *source, int ac, const char **av)
|
||||
}
|
||||
|
||||
if (is_sqlined && !is_oper(user)) {
|
||||
ircdproto->SendKick(findbot(Config.s_OperServ), av[1], s, "Q-Lined");
|
||||
ircdproto->SendKick(findbot(Config.s_OperServ), c, user, "Q-Lined");
|
||||
} else {
|
||||
if (!check_kick(user, av[1], ts)) {
|
||||
FOREACH_MOD(I_OnPreJoinChannel, OnPreJoinChannel(user, av[1]));
|
||||
@@ -1586,7 +1586,7 @@ void do_sjoin(const char *source, int ac, const char **av)
|
||||
}
|
||||
|
||||
if (is_sqlined && !is_oper(user)) {
|
||||
ircdproto->SendKick(findbot(Config.s_OperServ), av[1], s, "Q-Lined");
|
||||
ircdproto->SendKick(findbot(Config.s_OperServ), c, user, "Q-Lined");
|
||||
} else {
|
||||
if (!check_kick(user, av[1], ts)) {
|
||||
FOREACH_MOD(I_OnPreJoinChannel, OnPreJoinChannel(user, av[1]));
|
||||
@@ -1644,7 +1644,7 @@ void do_sjoin(const char *source, int ac, const char **av)
|
||||
}
|
||||
|
||||
if (is_sqlined && !is_oper(user)) {
|
||||
ircdproto->SendKick(findbot(Config.s_OperServ), av[1], user->nick, "Q-Lined");
|
||||
ircdproto->SendKick(findbot(Config.s_OperServ), c, user, "Q-Lined");
|
||||
} else {
|
||||
FOREACH_MOD(I_OnPreJoinChannel, OnPreJoinChannel(user, av[1]));
|
||||
|
||||
@@ -2047,7 +2047,7 @@ Channel *join_user_update(User * user, Channel * chan, const char *name,
|
||||
if (chan->ci->bi)
|
||||
{
|
||||
/* This is ugly, but it always works */
|
||||
ircdproto->SendPart(chan->ci->bi, chan->name, "TS reop");
|
||||
ircdproto->SendPart(chan->ci->bi, chan, "TS reop");
|
||||
bot_join(chan->ci);
|
||||
}
|
||||
/* Make sure +r is set */
|
||||
|
||||
+8
-8
@@ -136,7 +136,8 @@ class ChanServTimer : public Timer
|
||||
if (ci)
|
||||
ci->UnsetFlag(CI_INHABIT);
|
||||
|
||||
ircdproto->SendPart(findbot(Config.s_ChanServ), channel.c_str(), NULL);
|
||||
if (ci->c)
|
||||
ircdproto->SendPart(findbot(Config.s_ChanServ), ci->c, NULL);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -722,7 +723,8 @@ int check_kick(User * user, const char *chan, time_t chants)
|
||||
}
|
||||
|
||||
c->SetMode(NULL, CMODE_BAN, mask);
|
||||
ircdproto->SendKick(whosends(ci), chan, user->nick, "%s", reason);
|
||||
if (c)
|
||||
ircdproto->SendKick(whosends(ci), c, user, "%s", reason);
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -793,11 +795,10 @@ void restore_topic(const char *chan)
|
||||
c->SetMode(NULL, CMODE_OP, Config.s_ChanServ);
|
||||
}
|
||||
}
|
||||
ircdproto->SendTopic(whosends(ci), c->name, c->topic_setter,
|
||||
c->topic ? c->topic : "", c->topic_time);
|
||||
ircdproto->SendTopic(whosends(ci), c, c->topic_setter, c->topic ? c->topic : "");
|
||||
if (ircd->join2set) {
|
||||
if (whosends(ci) == findbot(Config.s_ChanServ)) {
|
||||
ircdproto->SendPart(findbot(Config.s_ChanServ), c->name, NULL);
|
||||
ircdproto->SendPart(findbot(Config.s_ChanServ), c, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -856,12 +857,11 @@ int check_topiclock(Channel * c, time_t topic_time)
|
||||
}
|
||||
}
|
||||
|
||||
ircdproto->SendTopic(whosends(ci), c->name, c->topic_setter,
|
||||
c->topic ? c->topic : "", c->topic_time);
|
||||
ircdproto->SendTopic(whosends(ci), c, c->topic_setter, c->topic ? c->topic : "");
|
||||
|
||||
if (ircd->join2set) {
|
||||
if (whosends(ci) == findbot(Config.s_ChanServ)) {
|
||||
ircdproto->SendPart(findbot(Config.s_ChanServ), c->ci->name, NULL);
|
||||
ircdproto->SendPart(findbot(Config.s_ChanServ), c, NULL);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
|
||||
+2
-3
@@ -78,10 +78,9 @@ class CommandCSBan : public Command
|
||||
if ((ci->HasFlag(CI_SIGNKICK))
|
||||
|| ((ci->HasFlag(CI_SIGNKICK_LEVEL))
|
||||
&& !check_access(u, ci, CA_SIGNKICK)))
|
||||
ircdproto->SendKick(whosends(ci), ci->name, target, "%s (%s)",
|
||||
reason, u->nick);
|
||||
ircdproto->SendKick(whosends(ci), ci->c, u2, "%s (%s)", reason, u->nick);
|
||||
else
|
||||
ircdproto->SendKick(whosends(ci), ci->name, target, "%s", reason);
|
||||
ircdproto->SendKick(whosends(ci), ci->c, u2, "%s", reason);
|
||||
|
||||
const char *kav[4];
|
||||
kav[0] = ci->name;
|
||||
|
||||
+4
-4
@@ -68,18 +68,18 @@ class CommandCSClear : public Command
|
||||
|
||||
if (ircd->svsmode_ucmode) {
|
||||
av[0] = chan;
|
||||
ircdproto->SendSVSModeChan(av[0], "-o", NULL);
|
||||
ircdproto->SendSVSModeChan(c, "-o", NULL);
|
||||
if (owner) {
|
||||
modebuf = '-';
|
||||
modebuf += owner->ModeChar;
|
||||
|
||||
ircdproto->SendSVSModeChan(av[0], modebuf.c_str(), NULL);
|
||||
ircdproto->SendSVSModeChan(c, modebuf.c_str(), NULL);
|
||||
}
|
||||
if (admin) {
|
||||
modebuf = '-';
|
||||
modebuf += admin->ModeChar;
|
||||
|
||||
ircdproto->SendSVSModeChan(av[0], modebuf.c_str(), NULL);
|
||||
ircdproto->SendSVSModeChan(c, modebuf.c_str(), NULL);
|
||||
}
|
||||
for (cu = c->users; cu; cu = bnext)
|
||||
{
|
||||
@@ -159,7 +159,7 @@ class CommandCSClear : public Command
|
||||
av[0] = sstrdup(chan);
|
||||
av[1] = sstrdup(cu->user->nick);
|
||||
av[2] = sstrdup(buf);
|
||||
ircdproto->SendKick(whosends(ci), av[0], av[1], av[2]);
|
||||
ircdproto->SendKick(whosends(ci), c, cu->user, av[2]);
|
||||
do_kick(Config.s_ChanServ, 3, av);
|
||||
delete [] av[2];
|
||||
delete [] av[1];
|
||||
|
||||
+1
-1
@@ -81,7 +81,7 @@ class CommandCSDrop : public Command
|
||||
*/
|
||||
if (Config.WallDrop) {
|
||||
if ((level < ACCESS_FOUNDER) || (!IsRealFounder(u, ci) && ci->HasFlag(CI_SECUREFOUNDER)))
|
||||
ircdproto->SendGlobops(Config.s_ChanServ, "\2%s\2 used DROP on channel \2%s\2", u->nick, chan);
|
||||
ircdproto->SendGlobops(findbot(Config.s_ChanServ), "\2%s\2 used DROP on channel \2%s\2", u->nick, chan);
|
||||
}
|
||||
|
||||
notice_lang(Config.s_ChanServ, u, CHAN_DROPPED, chan);
|
||||
|
||||
@@ -85,13 +85,13 @@ class CommandCSForbid : public Command
|
||||
av[0] = c->name;
|
||||
av[1] = cu->user->nick;
|
||||
av[2] = reason ? reason : getstring(cu->user->nc, CHAN_FORBID_REASON);
|
||||
ircdproto->SendKick(findbot(Config.s_ChanServ), av[0], av[1], av[2]);
|
||||
ircdproto->SendKick(findbot(Config.s_ChanServ), c, cu->user, av[2]);
|
||||
do_kick(Config.s_ChanServ, 3, av);
|
||||
}
|
||||
}
|
||||
|
||||
if (Config.WallForbid)
|
||||
ircdproto->SendGlobops(Config.s_ChanServ, "\2%s\2 used FORBID on channel \2%s\2", u->nick, ci->name);
|
||||
ircdproto->SendGlobops(findbot(Config.s_ChanServ), "\2%s\2 used FORBID on channel \2%s\2", u->nick, ci->name);
|
||||
|
||||
if (ircd->chansqline)
|
||||
{
|
||||
|
||||
+2
-2
@@ -68,10 +68,10 @@ class CommandCSKick : public Command
|
||||
if ((ci->HasFlag(CI_SIGNKICK))
|
||||
|| ((ci->HasFlag(CI_SIGNKICK_LEVEL))
|
||||
&& !check_access(u, ci, CA_SIGNKICK)))
|
||||
ircdproto->SendKick(whosends(ci), ci->name, target, "%s (%s)",
|
||||
ircdproto->SendKick(whosends(ci), ci->c, u2, "%s (%s)",
|
||||
reason, u->nick);
|
||||
else
|
||||
ircdproto->SendKick(whosends(ci), ci->name, target, "%s", reason);
|
||||
ircdproto->SendKick(whosends(ci), ci->c, u2, "%s", reason);
|
||||
av[0] = ci->name;
|
||||
av[1] = target;
|
||||
av[2] = reason;
|
||||
|
||||
+1
-1
@@ -589,7 +589,7 @@ class CommandCSSet : public Command
|
||||
else if (ci->c)
|
||||
{
|
||||
if (Config.s_BotServ && ci->bi && ci->c->usercount == Config.BSMinUsers - 1)
|
||||
ircdproto->SendPart(ci->bi, ci->c->name, NULL);
|
||||
ircdproto->SendPart(ci->bi, ci->c, NULL);
|
||||
if (!ci->c->users)
|
||||
delete ci->c;
|
||||
|
||||
|
||||
@@ -75,13 +75,13 @@ class CommandCSSuspend : public Command
|
||||
av[0] = c->name;
|
||||
av[1] = cu->user->nick;
|
||||
av[2] = reason ? reason : getstring(cu->user->nc, CHAN_SUSPEND_REASON);
|
||||
ircdproto->SendKick(findbot(Config.s_ChanServ), av[0], av[1], av[2]);
|
||||
ircdproto->SendKick(findbot(Config.s_ChanServ), c, cu->user, av[2]);
|
||||
do_kick(Config.s_ChanServ, 3, av);
|
||||
}
|
||||
}
|
||||
|
||||
if (Config.WallForbid)
|
||||
ircdproto->SendGlobops(Config.s_ChanServ, "\2%s\2 used SUSPEND on channel \2%s\2", u->nick, ci->name);
|
||||
ircdproto->SendGlobops(findbot(Config.s_ChanServ), "\2%s\2 used SUSPEND on channel \2%s\2", u->nick, ci->name);
|
||||
|
||||
alog("%s: %s set SUSPEND for channel %s", Config.s_ChanServ, u->nick, ci->name);
|
||||
notice_lang(Config.s_ChanServ, u, CHAN_SUSPEND_SUCCEEDED, chan);
|
||||
@@ -151,7 +151,7 @@ class CommandCSUnSuspend : public Command
|
||||
}
|
||||
|
||||
if (Config.WallForbid)
|
||||
ircdproto->SendGlobops(Config.s_ChanServ, "\2%s\2 used UNSUSPEND on channel \2%s\2", u->nick, ci->name);
|
||||
ircdproto->SendGlobops(findbot(Config.s_ChanServ), "\2%s\2 used UNSUSPEND on channel \2%s\2", u->nick, ci->name);
|
||||
|
||||
alog("%s: %s set UNSUSPEND for channel %s", Config.s_ChanServ, u->nick, ci->name);
|
||||
notice_lang(Config.s_ChanServ, u, CHAN_UNSUSPEND_SUCCEEDED, chan);
|
||||
|
||||
+2
-2
@@ -61,9 +61,9 @@ class CommandCSTopic : public Command
|
||||
ircdproto->SendJoin(findbot(Config.s_ChanServ), c->name, c->creation_time);
|
||||
ircdproto->SendMode(NULL, c->name, "+o %s", Config.s_ChanServ);
|
||||
}
|
||||
ircdproto->SendTopic(whosends(ci), c->name, u->nick, topic ? topic : "", c->topic_time);
|
||||
ircdproto->SendTopic(whosends(ci), c, u->nick, topic ? topic : "");
|
||||
if (ircd->join2set && whosends(ci) == findbot(Config.s_ChanServ))
|
||||
ircdproto->SendPart(findbot(Config.s_ChanServ), c->name, NULL);
|
||||
ircdproto->SendPart(findbot(Config.s_ChanServ), c, NULL);
|
||||
}
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ class CommandHSOn : public Command
|
||||
notice_lang(Config.s_HostServ, u, HOST_IDENT_ACTIVATED, vIdent, vHost);
|
||||
else
|
||||
notice_lang(Config.s_HostServ, u, HOST_ACTIVATED, vHost);
|
||||
ircdproto->SendVhost(u->nick, vIdent, vHost);
|
||||
ircdproto->SendVhost(u, vIdent, vHost);
|
||||
if (ircd->vhost)
|
||||
{
|
||||
if (u->vhost)
|
||||
|
||||
+2
-2
@@ -43,7 +43,7 @@ class CommandNSDrop : public Command
|
||||
if ((nr = findrequestnick(nick)) && u->nc->IsServicesOper())
|
||||
{
|
||||
if (Config.WallDrop)
|
||||
ircdproto->SendGlobops(Config.s_NickServ, "\2%s\2 used DROP on \2%s\2", u->nick, nick);
|
||||
ircdproto->SendGlobops(findbot(Config.s_NickServ), "\2%s\2 used DROP on \2%s\2", u->nick, nick);
|
||||
alog("%s: %s!%s@%s dropped nickname %s (e-mail: %s)", Config.s_NickServ, u->nick, u->GetIdent().c_str(), u->host, nr->nick, nr->email);
|
||||
delete nr;
|
||||
notice_lang(Config.s_NickServ, u, NICK_X_DROPPED, nick);
|
||||
@@ -80,7 +80,7 @@ class CommandNSDrop : public Command
|
||||
if (!is_mine)
|
||||
{
|
||||
if (Config.WallDrop)
|
||||
ircdproto->SendGlobops(Config.s_NickServ, "\2%s\2 used DROP on \2%s\2", u->nick, nick);
|
||||
ircdproto->SendGlobops(findbot(Config.s_NickServ), "\2%s\2 used DROP on \2%s\2", u->nick, nick);
|
||||
notice_lang(Config.s_NickServ, u, NICK_X_DROPPED, nick);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -71,7 +71,7 @@ class CommandNSForbid : public Command
|
||||
ircdproto->SendSQLine(na->nick, reason ? reason : "Forbidden");
|
||||
|
||||
if (Config.WallForbid)
|
||||
ircdproto->SendGlobops(Config.s_NickServ, "\2%s\2 used FORBID on \2%s\2", u->nick, nick);
|
||||
ircdproto->SendGlobops(findbot(Config.s_NickServ), "\2%s\2 used FORBID on \2%s\2", u->nick, nick);
|
||||
|
||||
alog("%s: %s set FORBID for nick %s", Config.s_NickServ, u->nick, nick);
|
||||
notice_lang(Config.s_NickServ, u, NICK_FORBID_SUCCEEDED, nick);
|
||||
|
||||
@@ -35,7 +35,7 @@ class CommandNSGetPass : public Command
|
||||
{
|
||||
alog("%s: %s!%s@%s used GETPASS on %s", Config.s_NickServ, u->nick, u->GetIdent().c_str(), u->host, nick);
|
||||
if (Config.WallGetpass)
|
||||
ircdproto->SendGlobops(Config.s_NickServ, "\2%s\2 used GETPASS on \2%s\2", u->nick, nick);
|
||||
ircdproto->SendGlobops(findbot(Config.s_NickServ), "\2%s\2 used GETPASS on \2%s\2", u->nick, nick);
|
||||
notice_lang(Config.s_NickServ, u, NICK_GETPASS_PASSCODE_IS, nick, nr->passcode);
|
||||
}
|
||||
else
|
||||
@@ -51,7 +51,7 @@ class CommandNSGetPass : public Command
|
||||
{
|
||||
alog("%s: %s!%s@%s used GETPASS on %s", Config.s_NickServ, u->nick, u->GetIdent().c_str(), u->host, nick);
|
||||
if (Config.WallGetpass)
|
||||
ircdproto->SendGlobops(Config.s_NickServ, "\2%s\2 used GETPASS on \2%s\2", u->nick, nick);
|
||||
ircdproto->SendGlobops(findbot(Config.s_NickServ), "\2%s\2 used GETPASS on \2%s\2", u->nick, nick);
|
||||
notice_lang(Config.s_NickServ, u, NICK_GETPASS_PASSWORD_IS, nick, tmp_pass);
|
||||
}
|
||||
else
|
||||
|
||||
+1
-1
@@ -95,7 +95,7 @@ private:
|
||||
|
||||
alog("%s: %s!%s@%s used SASET PASSWORD on %s (e-mail: %s)", Config.s_NickServ, u->nick, u->GetIdent().c_str(), u->host, nc->display, nc->email ? nc->email : "none");
|
||||
if (Config.WallSetpass)
|
||||
ircdproto->SendGlobops(Config.s_NickServ, "\2%s\2 used SASET PASSWORD on \2%s\2", u->nick, nc->display);
|
||||
ircdproto->SendGlobops(findbot(Config.s_NickServ), "\2%s\2 used SASET PASSWORD on \2%s\2", u->nick, nc->display);
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ class CommandNSSuspend : public Command
|
||||
}
|
||||
|
||||
if (Config.WallForbid)
|
||||
ircdproto->SendGlobops(Config.s_NickServ, "\2%s\2 used SUSPEND on \2%s\2", u->nick, nick);
|
||||
ircdproto->SendGlobops(findbot(Config.s_NickServ), "\2%s\2 used SUSPEND on \2%s\2", u->nick, nick);
|
||||
|
||||
alog("%s: %s set SUSPEND for nick %s", Config.s_NickServ, u->nick, nick);
|
||||
notice_lang(Config.s_NickServ, u, NICK_SUSPEND_SUCCEEDED, nick);
|
||||
@@ -147,7 +147,7 @@ class CommandNSUnSuspend : public Command
|
||||
na->nc->UnsetFlag(NI_SUSPENDED);
|
||||
|
||||
if (Config.WallForbid)
|
||||
ircdproto->SendGlobops(Config.s_NickServ, "\2%s\2 used UNSUSPEND on \2%s\2", u->nick, nick);
|
||||
ircdproto->SendGlobops(findbot(Config.s_NickServ), "\2%s\2 used UNSUSPEND on \2%s\2", u->nick, nick);
|
||||
|
||||
alog("%s: %s set UNSUSPEND for nick %s", Config.s_NickServ, u->nick, nick);
|
||||
notice_lang(Config.s_NickServ, u, NICK_UNSUSPEND_SUCCEEDED, nick);
|
||||
|
||||
+1
-1
@@ -129,7 +129,7 @@ class CommandOSAKill : public Command
|
||||
snprintf(buf, sizeof(buf), "expires in %d %s%s", wall_expiry, s, wall_expiry == 1 ? "" : "s");
|
||||
}
|
||||
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "%s added an AKILL for %s (%s) (%s)", u->nick, mask, realreason, buf);
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "%s added an AKILL for %s (%s) (%s)", u->nick, mask, realreason, buf);
|
||||
}
|
||||
|
||||
if (readonly)
|
||||
|
||||
@@ -80,7 +80,7 @@ class CommandOSChanKill : public Command
|
||||
check_akill(cu->user->nick, cu->user->GetIdent().c_str(), cu->user->host, NULL, NULL);
|
||||
}
|
||||
if (Config.WallOSAkill)
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "%s used CHANKILL on %s (%s)", u->nick, channel, realreason);
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "%s used CHANKILL on %s (%s)", u->nick, channel, realreason);
|
||||
}
|
||||
else
|
||||
notice_lang(Config.s_OperServ, u, CHAN_X_NOT_IN_USE, channel);
|
||||
|
||||
@@ -54,12 +54,12 @@ class CommandOSClearModes : public Command
|
||||
}
|
||||
|
||||
if (Config.WallOSClearmodes)
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "%s used CLEARMODES%s on %s", u->nick, all ? " ALL" : "", chan);
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "%s used CLEARMODES%s on %s", u->nick, all ? " ALL" : "", chan);
|
||||
if (all)
|
||||
{
|
||||
/* Clear mode +o */
|
||||
if (ircd->svsmode_ucmode)
|
||||
ircdproto->SendSVSModeChan(c->name, "-o", NULL);
|
||||
ircdproto->SendSVSModeChan(c, "-o", NULL);
|
||||
else
|
||||
{
|
||||
for (cu = c->users; cu; cu = next)
|
||||
@@ -74,7 +74,7 @@ class CommandOSClearModes : public Command
|
||||
|
||||
/* Clear mode +v */
|
||||
if (ircd->svsmode_ucmode)
|
||||
ircdproto->SendSVSModeChan(c->name, "-v", NULL);
|
||||
ircdproto->SendSVSModeChan(c, "-v", NULL);
|
||||
else
|
||||
{
|
||||
for (cu = c->users; cu; cu = next)
|
||||
@@ -91,7 +91,7 @@ class CommandOSClearModes : public Command
|
||||
if (ModeManager::FindChannelModeByName(CMODE_HALFOP))
|
||||
{
|
||||
if (ircd->svsmode_ucmode)
|
||||
ircdproto->SendSVSModeChan(c->name, "-h", NULL);
|
||||
ircdproto->SendSVSModeChan(c, "-h", NULL);
|
||||
else
|
||||
{
|
||||
for (cu = c->users; cu; cu = next)
|
||||
@@ -112,7 +112,7 @@ class CommandOSClearModes : public Command
|
||||
buf += cm->ModeChar;
|
||||
|
||||
if (ircd->svsmode_ucmode)
|
||||
ircdproto->SendSVSModeChan(c->name, buf.c_str(), NULL);
|
||||
ircdproto->SendSVSModeChan(c, buf.c_str(), NULL);
|
||||
else
|
||||
{
|
||||
for (cu = c->users; cu; cu = next)
|
||||
@@ -133,7 +133,7 @@ class CommandOSClearModes : public Command
|
||||
buf += cm->ModeChar;
|
||||
|
||||
if (ircd->svsmode_ucmode)
|
||||
ircdproto->SendSVSModeChan(c->name, buf.c_str(), NULL);
|
||||
ircdproto->SendSVSModeChan(c, buf.c_str(), NULL);
|
||||
else
|
||||
{
|
||||
for (cu = c->users; cu; cu = next)
|
||||
|
||||
@@ -37,7 +37,7 @@ class DefConTimeout : public Timer
|
||||
Config.DefConLevel = level;
|
||||
FOREACH_MOD(I_OnDefconLevel, OnDefconLevel(level));
|
||||
alog("Defcon level timeout, returning to lvl %d", level);
|
||||
ircdproto->SendGlobops(Config.s_OperServ, getstring(OPER_DEFCON_WALL), Config.s_OperServ, level);
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), getstring(OPER_DEFCON_WALL), Config.s_OperServ, level);
|
||||
|
||||
if (Config.GlobalOnDefcon)
|
||||
{
|
||||
@@ -96,7 +96,7 @@ class CommandOSDEFCON : public Command
|
||||
notice_lang(Config.s_OperServ, u, OPER_DEFCON_CHANGED, Config.DefConLevel);
|
||||
defcon_sendlvls(u);
|
||||
alog("Defcon level changed to %d by Oper %s", newLevel, u->nick);
|
||||
ircdproto->SendGlobops(Config.s_OperServ, getstring(OPER_DEFCON_WALL), u->nick, newLevel);
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), getstring(OPER_DEFCON_WALL), u->nick, newLevel);
|
||||
/* Global notice the user what is happening. Also any Message that
|
||||
the Admin would like to add. Set in config file. */
|
||||
if (Config.GlobalOnDefcon)
|
||||
@@ -299,7 +299,7 @@ class OSDEFCON : public Module
|
||||
char akillmask[BUFSIZE];
|
||||
snprintf(akillmask, sizeof(akillmask), "*@%s", u->host);
|
||||
add_akill(NULL, akillmask, Config.s_OperServ, time(NULL) + Config.SessionAutoKillExpiry, "Session limit exceeded");
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "Added a temporary AKILL for \2%s\2 due to excessive connections", akillmask);
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "Added a temporary AKILL for \2%s\2 due to excessive connections", akillmask);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ class CommandOSGlobal : public Command
|
||||
const char *msg = params[0].c_str();
|
||||
|
||||
if (Config.WallOSGlobal)
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "\2%s\2 just used GLOBAL command.", u->nick);
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "\2%s\2 just used GLOBAL command.", u->nick);
|
||||
oper_global(u->nick, "%s", msg);
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ class CommandOSJupe : public Command
|
||||
ircdproto->SendServer(juped_server);
|
||||
|
||||
if (Config.WallOSJupe)
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "\2%s\2 used JUPE on \2%s\2", u->nick, jserver);
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "\2%s\2 used JUPE on \2%s\2", u->nick, jserver);
|
||||
}
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
+10
-3
@@ -27,6 +27,7 @@ class CommandOSKick : public Command
|
||||
const char *argv[3];
|
||||
const char *chan = params[0].c_str(), *nick = params[1].c_str(), *s = params[2].c_str();
|
||||
Channel *c;
|
||||
User *u2;
|
||||
|
||||
if (!(c = findchan(chan)))
|
||||
{
|
||||
@@ -38,11 +39,17 @@ class CommandOSKick : public Command
|
||||
notice_lang(Config.s_OperServ, u, OPER_BOUNCY_MODES_U_LINE);
|
||||
return MOD_CONT;
|
||||
}
|
||||
ircdproto->SendKick(findbot(Config.s_OperServ), chan, nick, "%s (%s)", u->nick, s);
|
||||
else if (!(u2 = finduser(nick)))
|
||||
{
|
||||
notice_lang(Config.s_OperServ, u, NICK_X_NOT_IN_USE, nick);
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
ircdproto->SendKick(findbot(Config.s_OperServ), c, u2, "%s (%s)", u->nick, s);
|
||||
if (Config.WallOSKick)
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "%s used KICK on %s/%s", u->nick, nick, chan);
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "%s used KICK on %s/%s", u->nick, u2->nick, chan);
|
||||
argv[0] = sstrdup(chan);
|
||||
argv[1] = sstrdup(nick);
|
||||
argv[1] = sstrdup(u2->nick);
|
||||
argv[2] = sstrdup(s);
|
||||
do_kick(Config.s_OperServ, 3, argv);
|
||||
delete [] argv[2];
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ class CommandOSMode : public Command
|
||||
c->SetModes(findbot(Config.s_OperServ), false, modes);
|
||||
|
||||
if (Config.WallOSMode)
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "%s used MODE %s on %s", u->nick, modes, chan);
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "%s used MODE %s on %s", u->nick, modes, chan);
|
||||
}
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ class CommandOSNOOP : public Command
|
||||
|
||||
snprintf(reason, sizeof(reason), "NOOP command used by %s", u->nick);
|
||||
if (Config.WallOSNoOp)
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "\2%s\2 used NOOP on \2%s\2", u->nick, server);
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "\2%s\2 used NOOP on \2%s\2", u->nick, server);
|
||||
notice_lang(Config.s_OperServ, u, OPER_NOOP_SET, server);
|
||||
|
||||
/* Kill all the IRCops of the server */
|
||||
|
||||
+2
-2
@@ -37,13 +37,13 @@ class CommandOSOLine : public Command
|
||||
u2->SetMode(UMODE_OPER);
|
||||
notice_lang(Config.s_OperServ, u2, OPER_OLINE_IRCOP);
|
||||
notice_lang(Config.s_OperServ, u, OPER_OLINE_SUCCESS, flag, nick);
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "\2%s\2 used OLINE for %s", u->nick, nick);
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "\2%s\2 used OLINE for %s", u->nick, nick);
|
||||
}
|
||||
else if (u2 && flag[0] == '-')
|
||||
{
|
||||
ircdproto->SendSVSO(Config.s_OperServ, nick, flag);
|
||||
notice_lang(Config.s_OperServ, u, OPER_OLINE_SUCCESS, flag, nick);
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "\2%s\2 used OLINE for %s", u->nick, nick);
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "\2%s\2 used OLINE for %s", u->nick, nick);
|
||||
}
|
||||
else
|
||||
this->OnSyntaxError(u, "");
|
||||
|
||||
+3
-3
@@ -124,7 +124,7 @@ class CommandOSSet : public Command
|
||||
{
|
||||
alog("No longer sending log messages to a channel");
|
||||
if (ircd->join2msg)
|
||||
ircdproto->SendPart(findbot(Config.s_GlobalNoticer), Config.LogChannel, NULL);
|
||||
ircdproto->SendPart(findbot(Config.s_GlobalNoticer), findchan(Config.LogChannel), NULL);
|
||||
LogChan = false;
|
||||
notice_lang(Config.s_OperServ, u, OPER_SET_LOGCHAN_OFF);
|
||||
}
|
||||
@@ -156,14 +156,14 @@ class CommandOSSet : public Command
|
||||
u->isSuperAdmin = 1;
|
||||
notice_lang(Config.s_OperServ, u, OPER_SUPER_ADMIN_ON);
|
||||
alog("%s: %s is a SuperAdmin ", Config.s_OperServ, u->nick);
|
||||
ircdproto->SendGlobops(Config.s_OperServ, getstring(OPER_SUPER_ADMIN_WALL_ON), u->nick);
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), getstring(OPER_SUPER_ADMIN_WALL_ON), u->nick);
|
||||
}
|
||||
else if (setting == "OFF")
|
||||
{
|
||||
u->isSuperAdmin = 0;
|
||||
notice_lang(Config.s_OperServ, u, OPER_SUPER_ADMIN_OFF);
|
||||
alog("%s: %s is no longer a SuperAdmin", Config.s_OperServ, u->nick);
|
||||
ircdproto->SendGlobops(Config.s_OperServ, getstring(OPER_SUPER_ADMIN_WALL_OFF), u->nick);
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), getstring(OPER_SUPER_ADMIN_WALL_OFF), u->nick);
|
||||
}
|
||||
else
|
||||
notice_lang(Config.s_OperServ, u, OPER_SUPER_ADMIN_SYNTAX);
|
||||
|
||||
@@ -129,7 +129,7 @@ class CommandOSSGLine : public Command
|
||||
snprintf(buf, sizeof(buf), "expires in %d %s%s", wall_expiry, s, wall_expiry == 1 ? "" : "s");
|
||||
}
|
||||
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "%s added an SGLINE for %s (%s)", u->nick, cmask, buf);
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "%s added an SGLINE for %s (%s)", u->nick, cmask, buf);
|
||||
}
|
||||
|
||||
if (readonly)
|
||||
|
||||
@@ -115,7 +115,7 @@ class CommandOSSQLine : public Command
|
||||
snprintf(buf, sizeof(buf), "expires in %d %s%s", wall_expiry, s, wall_expiry == 1 ? "" : "s");
|
||||
}
|
||||
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "%s added an SQLINE for %s (%s)", u->nick, mask, buf);
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "%s added an SQLINE for %s (%s)", u->nick, mask, buf);
|
||||
}
|
||||
|
||||
if (readonly)
|
||||
|
||||
@@ -26,6 +26,7 @@ class CommandOSSVSNick : public Command
|
||||
{
|
||||
const char *nick = params[0].c_str();
|
||||
ci::string newnick = params[1];
|
||||
User *u2;
|
||||
|
||||
NickAlias *na;
|
||||
|
||||
@@ -52,7 +53,7 @@ class CommandOSSVSNick : public Command
|
||||
}
|
||||
|
||||
/* Check for a nick in use or a forbidden/suspended nick */
|
||||
if (!finduser(nick))
|
||||
if (!(u2 = finduser(nick)))
|
||||
notice_lang(Config.s_OperServ, u, NICK_X_NOT_IN_USE, nick);
|
||||
else if (finduser(newnick.c_str()))
|
||||
notice_lang(Config.s_OperServ, u, NICK_X_IN_USE, newnick.c_str());
|
||||
@@ -61,8 +62,8 @@ class CommandOSSVSNick : public Command
|
||||
else
|
||||
{
|
||||
notice_lang(Config.s_OperServ, u, OPER_SVSNICK_NEWNICK, nick, newnick.c_str());
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "%s used SVSNICK to change %s to %s", u->nick, nick, newnick.c_str());
|
||||
ircdproto->SendForceNickChange(nick, newnick.c_str(), time(NULL));
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "%s used SVSNICK to change %s to %s", u->nick, nick, newnick.c_str());
|
||||
ircdproto->SendForceNickChange(u2, newnick.c_str(), time(NULL));
|
||||
}
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ class CommandOSSZLine : public Command
|
||||
snprintf(buf, sizeof(buf), "expires in %d %s%s", wall_expiry, s, wall_expiry == 1 ? "" : "s");
|
||||
}
|
||||
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "%s added an SZLINE for %s (%s)", u->nick, mask, buf);
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "%s added an SZLINE for %s (%s)", u->nick, mask, buf);
|
||||
}
|
||||
|
||||
if (readonly)
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ class CommandOSUMode : public Command
|
||||
notice_lang(Config.s_OperServ, u2, OPER_UMODE_CHANGED, u->nick);
|
||||
|
||||
if (Config.WallOSMode)
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "\2%s\2 used UMODE on %s", u->nick, nick);
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "\2%s\2 used UMODE on %s", u->nick, nick);
|
||||
}
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
+1
-2
@@ -18,7 +18,6 @@
|
||||
#include <fcntl.h>
|
||||
|
||||
static int curday = 0;
|
||||
static time_t lastwarn = 0;
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
@@ -37,7 +36,7 @@ static void rename_database(const char *name, char *ext)
|
||||
snprintf(destpath, sizeof(destpath), "backups/%s.%s", name, ext);
|
||||
if (rename(name, destpath) != 0) {
|
||||
alog("Backup of %s failed.", name);
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "WARNING! Backup of %s failed.",
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "WARNING! Backup of %s failed.",
|
||||
name);
|
||||
}
|
||||
}
|
||||
|
||||
+7
-7
@@ -129,7 +129,7 @@ HostCore *createHostCorelist(HostCore * next, const char *nick, char *vIdent,
|
||||
|
||||
next = new HostCore;
|
||||
if (next == NULL) {
|
||||
ircdproto->SendGlobops(Config.s_HostServ,
|
||||
ircdproto->SendGlobops(findbot(Config.s_HostServ),
|
||||
"Unable to allocate memory to create the vHost LL, problems i sense..");
|
||||
} else {
|
||||
next->nick = new char[strlen(nick) + 1];
|
||||
@@ -139,7 +139,7 @@ HostCore *createHostCorelist(HostCore * next, const char *nick, char *vIdent,
|
||||
next->vIdent = new char[strlen(vIdent) + 1];
|
||||
if ((next->nick == NULL) || (next->vHost == NULL)
|
||||
|| (next->creator == NULL)) {
|
||||
ircdproto->SendGlobops(Config.s_HostServ,
|
||||
ircdproto->SendGlobops(findbot(Config.s_HostServ),
|
||||
"Unable to allocate memory to create the vHost LL, problems i sense..");
|
||||
return NULL;
|
||||
}
|
||||
@@ -148,7 +148,7 @@ HostCore *createHostCorelist(HostCore * next, const char *nick, char *vIdent,
|
||||
strlcpy(next->creator, creator, strlen(creator) + 1);
|
||||
if (vIdent) {
|
||||
if ((next->vIdent == NULL)) {
|
||||
ircdproto->SendGlobops(Config.s_HostServ,
|
||||
ircdproto->SendGlobops(findbot(Config.s_HostServ),
|
||||
"Unable to allocate memory to create the vHost LL, problems i sense..");
|
||||
return NULL;
|
||||
}
|
||||
@@ -217,7 +217,7 @@ HostCore *insertHostCore(HostCore * phead, HostCore * prev, const char *nick,
|
||||
|
||||
newCore = new HostCore;
|
||||
if (newCore == NULL) {
|
||||
ircdproto->SendGlobops(Config.s_HostServ,
|
||||
ircdproto->SendGlobops(findbot(Config.s_HostServ),
|
||||
"Unable to allocate memory to insert into the vHost LL, problems i sense..");
|
||||
return NULL;
|
||||
} else {
|
||||
@@ -228,7 +228,7 @@ HostCore *insertHostCore(HostCore * phead, HostCore * prev, const char *nick,
|
||||
newCore->vIdent = new char[strlen(vIdent) + 1];
|
||||
if ((newCore->nick == NULL) || (newCore->vHost == NULL)
|
||||
|| (newCore->creator == NULL)) {
|
||||
ircdproto->SendGlobops(Config.s_HostServ,
|
||||
ircdproto->SendGlobops(findbot(Config.s_HostServ),
|
||||
"Unable to allocate memory to create the vHost LL, problems i sense..");
|
||||
return NULL;
|
||||
}
|
||||
@@ -237,7 +237,7 @@ HostCore *insertHostCore(HostCore * phead, HostCore * prev, const char *nick,
|
||||
strlcpy(newCore->creator, creator, strlen(creator) + 1);
|
||||
if (vIdent) {
|
||||
if ((newCore->vIdent == NULL)) {
|
||||
ircdproto->SendGlobops(Config.s_HostServ,
|
||||
ircdproto->SendGlobops(findbot(Config.s_HostServ),
|
||||
"Unable to allocate memory to create the vHost LL, problems i sense..");
|
||||
return NULL;
|
||||
}
|
||||
@@ -385,7 +385,7 @@ int do_on_id(User * u)
|
||||
} else {
|
||||
notice_lang(Config.s_HostServ, u, HOST_ACTIVATED, vHost);
|
||||
}
|
||||
ircdproto->SendVhost(u->nick, vIdent, vHost);
|
||||
ircdproto->SendVhost(u, vIdent, vHost);
|
||||
if (ircd->vhost)
|
||||
{
|
||||
if (u->vhost)
|
||||
|
||||
+1
-1
@@ -174,7 +174,7 @@ int m_privmsg(const char *source, const char *receiver, const char *msg)
|
||||
{
|
||||
notice_lang(Config.s_OperServ, u, ACCESS_DENIED);
|
||||
if (Config.WallBadOS)
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "Denied access to %s from %s!%s@%s (non-oper)", Config.s_OperServ, u->nick, u->GetIdent().c_str(), u->host);
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "Denied access to %s from %s!%s@%s (non-oper)", Config.s_OperServ, u->nick, u->GetIdent().c_str(), u->host);
|
||||
}
|
||||
else
|
||||
operserv(u, const_cast<char *>(msg)); // XXX Unsafe cast, this needs reviewing -- CyberBotX
|
||||
|
||||
@@ -246,7 +246,7 @@ int ModuleManager::LoadModule(const std::string &modname, User * u)
|
||||
|
||||
if (u)
|
||||
{
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "%s loaded module %s", u->nick, modname.c_str());
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "%s loaded module %s", u->nick, modname.c_str());
|
||||
notice_lang(Config.s_OperServ, u, OPER_MODULE_LOADED, modname.c_str());
|
||||
|
||||
/* If a user is loading this module, then the core databases have already been loaded
|
||||
@@ -276,7 +276,7 @@ int ModuleManager::UnloadModule(Module *m, User *u)
|
||||
|
||||
if (u)
|
||||
{
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "%s unloaded module %s", u->nick, m->name.c_str());
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "%s unloaded module %s", u->nick, m->name.c_str());
|
||||
notice_lang(Config.s_OperServ, u, OPER_MODULE_UNLOADED, m->name.c_str());
|
||||
}
|
||||
|
||||
|
||||
@@ -105,11 +105,11 @@ class CommandCSAppendTopic : public Command
|
||||
ircdproto->SendMode(NULL, c->name, "+o %s", Config.s_ChanServ);
|
||||
}
|
||||
}
|
||||
ircdproto->SendTopic(whosends(ci), c->name, u->nick, topic, c->topic_time);
|
||||
ircdproto->SendTopic(whosends(ci), c, u->nick, topic);
|
||||
if (ircd->join2set)
|
||||
{
|
||||
if (whosends(ci) == findbot(Config.s_ChanServ))
|
||||
ircdproto->SendPart(findbot(Config.s_ChanServ), c->name, NULL);
|
||||
ircdproto->SendPart(findbot(Config.s_ChanServ), c, NULL);
|
||||
}
|
||||
}
|
||||
return MOD_CONT;
|
||||
|
||||
@@ -121,7 +121,7 @@ class CommandCSEnforce : public Command
|
||||
get_idealban(ci, u, mask, sizeof(mask));
|
||||
reason = getstring(u, CHAN_NOT_ALLOWED_TO_JOIN);
|
||||
c->SetMode(NULL, CMODE_BAN, mask);
|
||||
ircdproto->SendKick(whosends(ci), ci->name, u->nick, "%s", reason);
|
||||
ircdproto->SendKick(whosends(ci), ci->c, u, "%s", reason);
|
||||
av[0] = ci->name;
|
||||
av[1] = u->nick;
|
||||
av[2] = reason;
|
||||
@@ -162,7 +162,7 @@ class CommandCSEnforce : public Command
|
||||
{
|
||||
c->SetMode(NULL, CMODE_BAN, mask);
|
||||
}
|
||||
ircdproto->SendKick(whosends(ci), ci->name, u->nick, "%s", reason);
|
||||
ircdproto->SendKick(whosends(ci), ci->c, u, "%s", reason);
|
||||
av[0] = ci->name;
|
||||
av[1] = u->nick;
|
||||
av[2] = reason;
|
||||
|
||||
@@ -550,7 +550,7 @@ class OSInfo : public Module
|
||||
if (!(out = fopen(OSInfoDBName, "w")))
|
||||
{
|
||||
alog("os_info: ERROR: can not open the database file!");
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "os_info: ERROR: can not open the database file!");
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "os_info: ERROR: can not open the database file!");
|
||||
ret = 1;
|
||||
}
|
||||
else
|
||||
|
||||
+6
-2
@@ -367,7 +367,7 @@ void cancel_user(User * u)
|
||||
}
|
||||
else
|
||||
{
|
||||
ircdproto->SendSVSKill(Config.s_NickServ, u->nick, "Please do not use a registered nickname without identifying");
|
||||
ircdproto->SendSVSKill(findbot(Config.s_NickServ), u, "Please do not use a registered nickname without identifying");
|
||||
}
|
||||
na->SetFlag(NS_KILL_HELD);
|
||||
}
|
||||
@@ -779,6 +779,10 @@ void collide(NickAlias * na, int from_timeout)
|
||||
|
||||
if (ircd->svsnick)
|
||||
{
|
||||
User *u = finduser(na->nick);
|
||||
if (!u)
|
||||
return;
|
||||
|
||||
/* We need to make sure the guestnick is free -- heinz */
|
||||
do
|
||||
{
|
||||
@@ -787,7 +791,7 @@ void collide(NickAlias * na, int from_timeout)
|
||||
}
|
||||
while (finduser(guestnick));
|
||||
notice_lang(Config.s_NickServ, finduser(na->nick), FORCENICKCHANGE_CHANGING, guestnick);
|
||||
ircdproto->SendForceNickChange(na->nick, guestnick, time(NULL));
|
||||
ircdproto->SendForceNickChange(u, guestnick, time(NULL));
|
||||
na->SetFlag(NS_GUESTED);
|
||||
}
|
||||
else
|
||||
|
||||
+16
-20
@@ -311,8 +311,7 @@ int add_akill(User * u, const char *mask, const char *by, const time_t expires,
|
||||
slist_add(&akills, entry);
|
||||
|
||||
if (Config.AkillOnAdd)
|
||||
ircdproto->SendAkill(entry->user, entry->host, entry->by, entry->seton,
|
||||
entry->expires, entry->reason);
|
||||
ircdproto->SendAkill(entry);
|
||||
|
||||
delete [] mask2;
|
||||
|
||||
@@ -336,16 +335,14 @@ int check_akill(const char *nick, const char *username, const char *host,
|
||||
continue;
|
||||
if (Anope::Match(username, ak->user, false)
|
||||
&& Anope::Match(host, ak->host, false)) {
|
||||
ircdproto->SendAkill(ak->user, ak->host, ak->by, ak->seton,
|
||||
ak->expires, ak->reason);
|
||||
ircdproto->SendAkill(ak);
|
||||
return 1;
|
||||
}
|
||||
if (ircd->vhost) {
|
||||
if (vhost) {
|
||||
if (Anope::Match(username, ak->user, false)
|
||||
&& Anope::Match(vhost, ak->host, false)) {
|
||||
ircdproto->SendAkill(ak->user, ak->host, ak->by, ak->seton,
|
||||
ak->expires, ak->reason);
|
||||
ircdproto->SendAkill(ak);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -354,8 +351,7 @@ int check_akill(const char *nick, const char *username, const char *host,
|
||||
if (ip) {
|
||||
if (Anope::Match(username, ak->user, false)
|
||||
&& Anope::Match(ip, ak->host, false)) {
|
||||
ircdproto->SendAkill(ak->user, ak->host, ak->by, ak->seton,
|
||||
ak->expires, ak->reason);
|
||||
ircdproto->SendAkill(ak);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -381,7 +377,7 @@ void expire_akills()
|
||||
continue;
|
||||
|
||||
if (Config.WallAkillExpire)
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "AKILL on %s@%s has expired",
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "AKILL on %s@%s has expired",
|
||||
ak->user, ak->host);
|
||||
slist_delete(&akills, i);
|
||||
}
|
||||
@@ -392,7 +388,7 @@ static void free_akill_entry(SList * slist, void *item)
|
||||
Akill *ak = static_cast<Akill *>(item);
|
||||
|
||||
/* Remove the AKILLs from all the servers */
|
||||
ircdproto->SendAkillDel(ak->user, ak->host);
|
||||
ircdproto->SendAkillDel(ak);
|
||||
|
||||
/* Free the structure */
|
||||
delete [] ak->user;
|
||||
@@ -510,7 +506,7 @@ int add_sgline(User * u, const char *mask, const char *by, time_t expires,
|
||||
|
||||
slist_add(&sglines, entry);
|
||||
|
||||
ircdproto->SendSGLine(entry->mask, entry->reason);
|
||||
ircdproto->SendSGLine(entry);
|
||||
|
||||
if (Config.KillonSGline && !ircd->sglineenforce) {
|
||||
snprintf(buf, (BUFSIZE - 1), "G-Lined: %s", entry->reason);
|
||||
@@ -544,9 +540,9 @@ int check_sgline(const char *nick, const char *realname)
|
||||
continue;
|
||||
|
||||
if (Anope::Match(realname, sx->mask, false)) {
|
||||
ircdproto->SendSGLine(sx->mask, sx->reason);
|
||||
ircdproto->SendSGLine(sx);
|
||||
/* We kill nick since s_sgline can't */
|
||||
ircdproto->SendSVSKill(Config.ServerName, nick, "G-Lined: %s", sx->reason);
|
||||
ircdproto->SendSVSKill(NULL, finduser(nick), "G-Lined: %s", sx->reason);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -569,7 +565,7 @@ void expire_sglines()
|
||||
continue;
|
||||
|
||||
if (Config.WallSGLineExpire)
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "SGLINE on \2%s\2 has expired",
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "SGLINE on \2%s\2 has expired",
|
||||
sx->mask);
|
||||
slist_delete(&sglines, i);
|
||||
}
|
||||
@@ -580,7 +576,7 @@ static void free_sgline_entry(SList * slist, void *item)
|
||||
SXLine *sx = static_cast<SXLine *>(item);
|
||||
|
||||
/* Remove the SGLINE from all the servers */
|
||||
ircdproto->SendSGLineDel(sx->mask);
|
||||
ircdproto->SendSGLineDel(sx);
|
||||
|
||||
/* Free the structure */
|
||||
delete [] sx->mask;
|
||||
@@ -789,7 +785,7 @@ void expire_sqlines()
|
||||
continue;
|
||||
|
||||
if (Config.WallSQLineExpire)
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "SQLINE on \2%s\2 has expired",
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "SQLINE on \2%s\2 has expired",
|
||||
sx->mask);
|
||||
|
||||
slist_delete(&sqlines, i);
|
||||
@@ -908,7 +904,7 @@ int add_szline(User * u, const char *mask, const char *by, time_t expires,
|
||||
entry->expires = expires;
|
||||
|
||||
slist_add(&szlines, entry);
|
||||
ircdproto->SendSZLine(entry->mask, entry->reason, entry->by);
|
||||
ircdproto->SendSZLine(entry);
|
||||
|
||||
return deleted;
|
||||
}
|
||||
@@ -934,7 +930,7 @@ int check_szline(const char *nick, char *ip)
|
||||
}
|
||||
|
||||
if (Anope::Match(ip, sx->mask, false)) {
|
||||
ircdproto->SendSZLine(sx->mask, sx->reason, sx->by);
|
||||
ircdproto->SendSZLine(sx);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -958,7 +954,7 @@ void expire_szlines()
|
||||
continue;
|
||||
|
||||
if (Config.WallSZLineExpire)
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "SZLINE on \2%s\2 has expired",
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "SZLINE on \2%s\2 has expired",
|
||||
sx->mask);
|
||||
slist_delete(&szlines, i);
|
||||
}
|
||||
@@ -969,7 +965,7 @@ static void free_szline_entry(SList * slist, void *item)
|
||||
SXLine *sx = static_cast<SXLine *>(item);
|
||||
|
||||
/* Remove the SZLINE from all the servers */
|
||||
ircdproto->SendSZLineDel(sx->mask);
|
||||
ircdproto->SendSZLineDel(sx);
|
||||
|
||||
/* Free the structure */
|
||||
delete [] sx->mask;
|
||||
|
||||
+23
-18
@@ -26,19 +26,18 @@ void IRCDProto::SendQuitInternal(BotInfo *bi, const char *buf)
|
||||
send_cmd(ircd->ts6 ? bi->uid : bi->nick, "QUIT");
|
||||
}
|
||||
|
||||
void IRCDProto::SendPartInternal(BotInfo *bi, const char *chan, const char *buf)
|
||||
void IRCDProto::SendPartInternal(BotInfo *bi, Channel *chan, const char *buf)
|
||||
{
|
||||
if (buf)
|
||||
send_cmd(ircd->ts6 ? bi->uid : bi->nick, "PART %s :%s", chan, buf);
|
||||
send_cmd(ircd->ts6 ? bi->uid : bi->nick, "PART %s :%s", chan->name, buf);
|
||||
else
|
||||
send_cmd(ircd->ts6 ? bi->uid : bi->nick, "PART %s", chan);
|
||||
send_cmd(ircd->ts6 ? bi->uid : bi->nick, "PART %s", chan->name);
|
||||
}
|
||||
|
||||
void IRCDProto::SendGlobopsInternal(const char *source, const char *buf)
|
||||
void IRCDProto::SendGlobopsInternal(BotInfo *source, const char *buf)
|
||||
{
|
||||
BotInfo *bi = findbot(source);
|
||||
if (bi)
|
||||
send_cmd(ircd->ts6 ? bi->uid : bi->nick, "GLOBOPS :%s", buf);
|
||||
if (source)
|
||||
send_cmd(ircd->ts6 ? source->uid : source->nick, "GLOBOPS :%s", buf);
|
||||
else
|
||||
send_cmd(Config.ServerName, "GLOBOPS :%s", buf);
|
||||
}
|
||||
@@ -55,8 +54,11 @@ void IRCDProto::SendNumericInternal(const char *source, int numeric, const char
|
||||
send_cmd(source, "%03d %s %s", numeric, dest, buf);
|
||||
}
|
||||
|
||||
void IRCDProto::SendSVSKill(const char *source, const char *user, const char *fmt, ...)
|
||||
void IRCDProto::SendSVSKill(BotInfo *source, User *user, const char *fmt, ...)
|
||||
{
|
||||
if (!user || !fmt)
|
||||
return;
|
||||
|
||||
va_list args;
|
||||
char buf[BUFSIZE] = "";
|
||||
va_start(args, fmt);
|
||||
@@ -85,8 +87,11 @@ void IRCDProto::SendMode(User *u, const char *fmt, ...)
|
||||
SendModeInternal(u, buf);
|
||||
}
|
||||
|
||||
void IRCDProto::SendKick(BotInfo *bi, const char *chan, const char *user, const char *fmt, ...)
|
||||
void IRCDProto::SendKick(BotInfo *bi, Channel *chan, User *user, const char *fmt, ...)
|
||||
{
|
||||
if (!bi || !chan || !user)
|
||||
return;
|
||||
|
||||
va_list args;
|
||||
char buf[BUFSIZE] = "";
|
||||
va_start(args, fmt);
|
||||
@@ -95,7 +100,7 @@ void IRCDProto::SendKick(BotInfo *bi, const char *chan, const char *user, const
|
||||
SendKickInternal(bi, chan, user, buf);
|
||||
}
|
||||
|
||||
void IRCDProto::SendNoticeChanops(BotInfo *bi, const char *dest, const char *fmt, ...)
|
||||
void IRCDProto::SendNoticeChanops(BotInfo *bi, Channel *dest, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
char buf[BUFSIZE] = "";
|
||||
@@ -146,14 +151,14 @@ void IRCDProto::SendPrivmsg(BotInfo *bi, const char *dest, const char *fmt, ...)
|
||||
SendPrivmsgInternal(bi, dest, buf);
|
||||
}
|
||||
|
||||
void IRCDProto::SendGlobalNotice(BotInfo *bi, const char *dest, const char *msg)
|
||||
void IRCDProto::SendGlobalNotice(BotInfo *bi, Server *dest, const char *msg)
|
||||
{
|
||||
send_cmd(ircd->ts6 ? bi->uid : bi->nick, "NOTICE %s%s :%s", ircd->globaltldprefix, dest, msg);
|
||||
send_cmd(ircd->ts6 ? bi->uid : bi->nick, "NOTICE %s%s :%s", ircd->globaltldprefix, dest->name, msg);
|
||||
}
|
||||
|
||||
void IRCDProto::SendGlobalPrivmsg(BotInfo *bi, const char *dest, const char *msg)
|
||||
void IRCDProto::SendGlobalPrivmsg(BotInfo *bi, Server *dest, const char *msg)
|
||||
{
|
||||
send_cmd(ircd->ts6 ? bi->uid : bi->nick, "PRIVMSG %s%s :%s", ircd->globaltldprefix, dest, msg);
|
||||
send_cmd(ircd->ts6 ? bi->uid : bi->nick, "PRIVMSG %s%s :%s", ircd->globaltldprefix, dest->name, msg);
|
||||
}
|
||||
|
||||
void IRCDProto::SendQuit(const char *nick, const char *)
|
||||
@@ -190,7 +195,7 @@ void IRCDProto::SendInvite(BotInfo *bi, const char *chan, const char *nick)
|
||||
send_cmd(ircd->ts6 ? bi->uid : bi->nick, "INVITE %s %s", nick, chan);
|
||||
}
|
||||
|
||||
void IRCDProto::SendPart(BotInfo *bi, const char *chan, const char *fmt, ...)
|
||||
void IRCDProto::SendPart(BotInfo *bi, Channel *chan, const char *fmt, ...)
|
||||
{
|
||||
if (fmt)
|
||||
{
|
||||
@@ -204,7 +209,7 @@ void IRCDProto::SendPart(BotInfo *bi, const char *chan, const char *fmt, ...)
|
||||
else SendPartInternal(bi, chan, NULL);
|
||||
}
|
||||
|
||||
void IRCDProto::SendGlobops(const char *source, const char *fmt, ...)
|
||||
void IRCDProto::SendGlobops(BotInfo *source, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
char buf[BUFSIZE] = "";
|
||||
@@ -223,9 +228,9 @@ void IRCDProto::SendChangeBotNick(BotInfo *bi, const char *newnick)
|
||||
{
|
||||
send_cmd(ircd->ts6 ? bi->uid : bi->nick, "NICK %s %ld", newnick, static_cast<long>(time(NULL)));
|
||||
}
|
||||
void IRCDProto::SendForceNickChange(const char *oldnick, const char *newnick, time_t when)
|
||||
void IRCDProto::SendForceNickChange(User *u, const char *newnick, time_t when)
|
||||
{
|
||||
send_cmd(NULL, "SVSNICK %s %s :%ld", oldnick, newnick, static_cast<long>(when));
|
||||
send_cmd(NULL, "SVSNICK %s %s :%ld", u->nick, newnick, static_cast<long>(when));
|
||||
}
|
||||
|
||||
void IRCDProto::SendCTCP(BotInfo *bi, const char *dest, const char *fmt, ...)
|
||||
|
||||
+29
-44
@@ -167,16 +167,16 @@ class BahamutIRCdProto : public IRCDProto
|
||||
}
|
||||
|
||||
/* SVSMODE -b */
|
||||
void SendBanDel(const char *name, const char *nick)
|
||||
void SendBanDel(Channel *c, const char *nick)
|
||||
{
|
||||
SendSVSModeChan(name, "-b", nick);
|
||||
SendSVSModeChan(c, "-b", nick);
|
||||
}
|
||||
|
||||
/* SVSMODE channel modes */
|
||||
void SendSVSModeChan(const char *name, const char *mode, const char *nick)
|
||||
void SendSVSModeChan(Channel *c, const char *mode, const char *nick)
|
||||
{
|
||||
if (nick) send_cmd(Config.ServerName, "SVSMODE %s %s %s", name, mode, nick);
|
||||
else send_cmd(Config.ServerName, "SVSMODE %s %s", name, mode);
|
||||
if (nick) send_cmd(Config.ServerName, "SVSMODE %s %s %s", c->name, mode, nick);
|
||||
else send_cmd(Config.ServerName, "SVSMODE %s %s", c->name, mode);
|
||||
}
|
||||
|
||||
/* SQLINE */
|
||||
@@ -187,27 +187,27 @@ class BahamutIRCdProto : public IRCDProto
|
||||
}
|
||||
|
||||
/* UNSGLINE */
|
||||
void SendSGLineDel(const char *mask)
|
||||
void SendSGLineDel(SXLine *sx)
|
||||
{
|
||||
send_cmd(NULL, "UNSGLINE 0 :%s", mask);
|
||||
send_cmd(NULL, "UNSGLINE 0 :%s", sx->mask);
|
||||
}
|
||||
|
||||
/* UNSZLINE */
|
||||
void SendSZLineDel(const char *mask)
|
||||
void SendSZLineDel(SXLine *sx)
|
||||
{
|
||||
/* this will likely fail so its only here for legacy */
|
||||
send_cmd(NULL, "UNSZLINE 0 %s", mask);
|
||||
send_cmd(NULL, "UNSZLINE 0 %s", sx->mask);
|
||||
/* this is how we are supposed to deal with it */
|
||||
send_cmd(NULL, "RAKILL %s *", mask);
|
||||
send_cmd(NULL, "RAKILL %s *", sx->mask);
|
||||
}
|
||||
|
||||
/* SZLINE */
|
||||
void SendSZLine(const char *mask, const char *reason, const char *whom)
|
||||
void SendSZLine(SXLine *sx)
|
||||
{
|
||||
/* this will likely fail so its only here for legacy */
|
||||
send_cmd(NULL, "SZLINE %s :%s", mask, reason);
|
||||
send_cmd(NULL, "SZLINE %s :%s", sx->mask, sx->reason);
|
||||
/* this is how we are supposed to deal with it */
|
||||
send_cmd(NULL, "AKILL %s * %d %s %ld :%s", mask, 172800, whom, static_cast<long>(time(NULL)), reason);
|
||||
send_cmd(NULL, "AKILL %s * %d %s %ld :%s", sx->mask, 172800, sx->by, static_cast<long>(time(NULL)), sx->reason);
|
||||
}
|
||||
|
||||
/* SVSNOOP */
|
||||
@@ -217,21 +217,21 @@ class BahamutIRCdProto : public IRCDProto
|
||||
}
|
||||
|
||||
/* SGLINE */
|
||||
void SendSGLine(const char *mask, const char *reason)
|
||||
void SendSGLine(SXLine *sx)
|
||||
{
|
||||
send_cmd(NULL, "SGLINE %d :%s:%s", static_cast<int>(strlen(mask)), mask, reason);
|
||||
send_cmd(NULL, "SGLINE %d :%s:%s", static_cast<int>(strlen(sx->mask)), sx->mask, sx->reason);
|
||||
}
|
||||
|
||||
/* RAKILL */
|
||||
void SendAkillDel(const char *user, const char *host)
|
||||
void SendAkillDel(Akill *ak)
|
||||
{
|
||||
send_cmd(NULL, "RAKILL %s %s", host, user);
|
||||
send_cmd(NULL, "RAKILL %s %s", ak->host, ak->user);
|
||||
}
|
||||
|
||||
/* TOPIC */
|
||||
void SendTopic(BotInfo *whosets, const char *chan, const char *whosetit, const char *topic, time_t when)
|
||||
void SendTopic(BotInfo *whosets, Channel *c, const char *whosetit, const char *topic)
|
||||
{
|
||||
send_cmd(whosets->nick, "TOPIC %s %s %lu :%s", chan, whosetit, static_cast<unsigned long>(when), topic);
|
||||
send_cmd(whosets->nick, "TOPIC %s %s %lu :%s", c->name, whosetit, static_cast<unsigned long>(c->topic_time), topic);
|
||||
}
|
||||
|
||||
/* UNSQLINE */
|
||||
@@ -246,35 +246,20 @@ class BahamutIRCdProto : public IRCDProto
|
||||
send_cmd(user->nick, "SJOIN %ld %s", static_cast<long>(chantime), channel);
|
||||
}
|
||||
|
||||
/* AKILL
|
||||
* parv[1]=host
|
||||
* parv[2]=user
|
||||
* parv[3]=length
|
||||
* parv[4]=akiller
|
||||
* parv[5]=time set
|
||||
* parv[6]=reason
|
||||
*/
|
||||
void SendAkill(const char *user, const char *host, const char *who, time_t when, time_t expires, const char *reason)
|
||||
void SendAkill(Akill *ak)
|
||||
{
|
||||
// Calculate the time left before this would expire, capping it at 2 days
|
||||
time_t timeleft = expires - time(NULL);
|
||||
time_t timeleft = ak->expires - time(NULL);
|
||||
if (timeleft > 172800) timeleft = 172800;
|
||||
send_cmd(NULL, "AKILL %s %s %d %s %ld :%s", host, user, static_cast<int>(timeleft), who, static_cast<long>(time(NULL)), reason);
|
||||
send_cmd(NULL, "AKILL %s %s %d %s %ld :%s", ak->host, ak->user, static_cast<int>(timeleft), ak->by, static_cast<long>(time(NULL)), ak->reason);
|
||||
}
|
||||
|
||||
/* SVSKILL */
|
||||
/* parv[0] = servername
|
||||
* parv[1] = client
|
||||
* parv[2] = nick stamp
|
||||
* parv[3] = kill message
|
||||
*/
|
||||
/*
|
||||
Note: if the stamp is null 0, the below usage is correct of Bahamut
|
||||
*/
|
||||
void SendSVSKillInternal(const char *source, const char *user, const char *buf)
|
||||
void SendSVSKillInternal(BotInfo *source, User *user, const char *buf)
|
||||
{
|
||||
if (!source || !user || !buf) return;
|
||||
send_cmd(source, "SVSKILL %s :%s", user, buf);
|
||||
send_cmd(source ? source->nick : NULL, "SVSKILL %s :%s", user->nick, buf);
|
||||
}
|
||||
|
||||
/* SVSMODE */
|
||||
@@ -294,16 +279,16 @@ class BahamutIRCdProto : public IRCDProto
|
||||
send_cmd(NULL, "BURST 0");
|
||||
}
|
||||
|
||||
void SendNoticeChanopsInternal(BotInfo *source, const char *dest, const char *buf)
|
||||
void SendNoticeChanopsInternal(BotInfo *source, Channel *dest, const char *buf)
|
||||
{
|
||||
if (!buf) return;
|
||||
send_cmd(NULL, "NOTICE @%s :%s", dest, buf);
|
||||
send_cmd(NULL, "NOTICE @%s :%s", dest->name, buf);
|
||||
}
|
||||
|
||||
void SendKickInternal(BotInfo *source, const char *chan, const char *user, const char *buf)
|
||||
void SendKickInternal(BotInfo *source, Channel *chan, User *user, const char *buf)
|
||||
{
|
||||
if (buf) send_cmd(source->nick, "KICK %s %s :%s", chan, user, buf);
|
||||
else send_cmd(source->nick, "KICK %s %s", chan, user);
|
||||
if (buf) send_cmd(source->nick, "KICK %s %s :%s", chan->name, user->nick, buf);
|
||||
else send_cmd(source->nick, "KICK %s %s", chan->name, user->nick);
|
||||
}
|
||||
|
||||
void SendClientIntroduction(const char *nick, const char *user, const char *host, const char *real, const char *modes, const char *uid)
|
||||
|
||||
+32
-34
@@ -129,14 +129,14 @@ static int has_hidechansmod = 0;
|
||||
/* CHGHOST */
|
||||
void inspircd_cmd_chghost(const char *nick, const char *vhost)
|
||||
{
|
||||
if (has_chghostmod == 1) {
|
||||
if (!nick || !vhost) {
|
||||
return;
|
||||
}
|
||||
send_cmd(Config.s_OperServ, "CHGHOST %s %s", nick, vhost);
|
||||
} else {
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "CHGHOST not loaded!");
|
||||
if (has_chghostmod == 1)
|
||||
{
|
||||
if (!nick || !vhost)
|
||||
return;
|
||||
send_cmd(Config.s_OperServ, "CHGHOST %s %s", nick, vhost);
|
||||
}
|
||||
else
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "CHGHOST not loaded!");
|
||||
}
|
||||
|
||||
int anope_event_idle(const char *source, int ac, const char **av)
|
||||
@@ -158,14 +158,14 @@ void inspircd_cmd_pass(const char *pass)
|
||||
|
||||
class InspIRCdProto : public IRCDProto
|
||||
{
|
||||
void SendAkillDel(const char *user, const char *host)
|
||||
void SendAkillDel(Akill *ak)
|
||||
{
|
||||
send_cmd(Config.s_OperServ, "GLINE %s@%s", user, host);
|
||||
send_cmd(Config.s_OperServ, "GLINE %s@%s", ak->user, ak->host);
|
||||
}
|
||||
|
||||
void SendTopic(BotInfo *whosets, const char *chan, const char *whosetit, const char *topic, time_t when)
|
||||
void SendTopic(BotInfo *whosets, Channel *c, const char *whosetit, const char *topic)
|
||||
{
|
||||
send_cmd(whosets->nick, "FTOPIC %s %lu %s :%s", chan, static_cast<unsigned long>(when), whosetit, topic);
|
||||
send_cmd(whosets->nick, "FTOPIC %s %lu %s :%s", c->name, static_cast<unsigned long>(c->topic_time), whosetit, topic);
|
||||
}
|
||||
|
||||
void SendVhostDel(User *u)
|
||||
@@ -181,19 +181,18 @@ class InspIRCdProto : public IRCDProto
|
||||
}
|
||||
}
|
||||
|
||||
void SendAkill(const char *user, const char *host, const char *who, time_t when, time_t expires, const char *reason)
|
||||
void SendAkill(Akill *ak)
|
||||
{
|
||||
// Calculate the time left before this would expire, capping it at 2 days
|
||||
time_t timeleft = expires - time(NULL);
|
||||
time_t timeleft = ak->expires - time(NULL);
|
||||
if (timeleft > 172800)
|
||||
timeleft = 172800;
|
||||
send_cmd(Config.ServerName, "ADDLINE G %s@%s %s %ld %ld :%s", user, host, who, static_cast<long>(time(NULL)), static_cast<long>(timeleft), reason);
|
||||
send_cmd(Config.ServerName, "ADDLINE G %s@%s %s %ld %ld :%s", ak->user, ak->host, ak->by, static_cast<long>(time(NULL)), static_cast<long>(timeleft), ak->reason);
|
||||
}
|
||||
|
||||
void SendSVSKillInternal(const char *source, const char *user, const char *buf)
|
||||
void SendSVSKillInternal(BotInfo *source, User *user, const char *buf)
|
||||
{
|
||||
if (!buf || !source || !user) return;
|
||||
send_cmd(source, "KILL %s :%s", user, buf);
|
||||
send_cmd(source ? source->nick : Config.ServerName, "KILL %s :%s", user->nick, buf);
|
||||
}
|
||||
|
||||
void SendSVSMode(User *u, int ac, const char **av)
|
||||
@@ -230,16 +229,16 @@ class InspIRCdProto : public IRCDProto
|
||||
send_cmd(nick, "OPERTYPE Service");
|
||||
}
|
||||
|
||||
void SendKickInternal(BotInfo *source, const char *chan, const char *user, const char *buf)
|
||||
void SendKickInternal(BotInfo *source, Channel *chan, User *user, const char *buf)
|
||||
{
|
||||
if (buf) send_cmd(source->nick, "KICK %s %s :%s", chan, user, buf);
|
||||
else send_cmd(source->nick, "KICK %s %s :%s", chan, user, user);
|
||||
if (buf) send_cmd(source->nick, "KICK %s %s :%s", chan->name, user->nick, buf);
|
||||
else send_cmd(source->nick, "KICK %s %s :%s", chan->name, user->nick, user->nick);
|
||||
}
|
||||
|
||||
void SendNoticeChanopsInternal(BotInfo *source, const char *dest, const char *buf)
|
||||
void SendNoticeChanopsInternal(BotInfo *source, Channel *dest, const char *buf)
|
||||
{
|
||||
if (!buf) return;
|
||||
send_cmd(Config.ServerName, "NOTICE @%s :%s", dest, buf);
|
||||
send_cmd(Config.ServerName, "NOTICE @%s :%s", dest->name, buf);
|
||||
}
|
||||
|
||||
/* SERVER services-dev.chatspike.net password 0 :Description here */
|
||||
@@ -277,11 +276,10 @@ class InspIRCdProto : public IRCDProto
|
||||
|
||||
/* Functions that use serval cmd functions */
|
||||
|
||||
void SendVhost(const char *nick, const char *vIdent, const char *vhost)
|
||||
void SendVhost(User *u, const char *vIdent, const char *vhost)
|
||||
{
|
||||
if (!nick) return;
|
||||
if (vIdent) inspircd_cmd_chgident(nick, vIdent);
|
||||
inspircd_cmd_chghost(nick, vhost);
|
||||
if (vIdent) inspircd_cmd_chgident(u->nick, vIdent);
|
||||
inspircd_cmd_chghost(u->nick, vhost);
|
||||
}
|
||||
|
||||
void SendConnect()
|
||||
@@ -302,7 +300,7 @@ class InspIRCdProto : public IRCDProto
|
||||
}
|
||||
send_cmd(Config.s_OperServ, "CHGIDENT %s %s", nick, vIdent);
|
||||
} else {
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "CHGIDENT not loaded!");
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "CHGIDENT not loaded!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -319,15 +317,15 @@ class InspIRCdProto : public IRCDProto
|
||||
}
|
||||
|
||||
/* UNSZLINE */
|
||||
void SendSZLineDel(const char *mask)
|
||||
void SendSZLineDel(SXLine *sx)
|
||||
{
|
||||
send_cmd(Config.s_OperServ, "ZLINE %s", mask);
|
||||
send_cmd(Config.s_OperServ, "ZLINE %s", sx->mask);
|
||||
}
|
||||
|
||||
/* SZLINE */
|
||||
void SendSZLine(const char *mask, const char *reason, const char *whom)
|
||||
void SendSZLine(SXLine *sx)
|
||||
{
|
||||
send_cmd(Config.ServerName, "ADDLINE Z %s %s %ld 0 :%s", mask, whom, static_cast<long>(time(NULL)), reason);
|
||||
send_cmd(Config.ServerName, "ADDLINE Z %s %s %ld 0 :%s", sx->mask, sx->by, static_cast<long>(time(NULL)), sx->reason);
|
||||
}
|
||||
|
||||
/* SVSMODE +- */
|
||||
@@ -905,13 +903,13 @@ int anope_event_capab(const char *source, int ac, const char **av)
|
||||
return MOD_STOP;
|
||||
}
|
||||
if (!has_svsholdmod) {
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "SVSHOLD missing, Usage disabled until module is loaded.");
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "SVSHOLD missing, Usage disabled until module is loaded.");
|
||||
}
|
||||
if (!has_chghostmod) {
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "CHGHOST missing, Usage disabled until module is loaded.");
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "CHGHOST missing, Usage disabled until module is loaded.");
|
||||
}
|
||||
if (!has_chgidentmod) {
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "CHGIDENT missing, Usage disabled until module is loaded.");
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "CHGIDENT missing, Usage disabled until module is loaded.");
|
||||
}
|
||||
if (has_messagefloodmod) {
|
||||
ModeManager::AddChannelMode('f', new ChannelModeFlood());
|
||||
|
||||
+33
-40
@@ -134,7 +134,7 @@ void inspircd_cmd_chghost(const char *nick, const char *vhost)
|
||||
{
|
||||
if (has_chghostmod != 1)
|
||||
{
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "CHGHOST not loaded!");
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "CHGHOST not loaded!");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -163,15 +163,15 @@ void inspircd_cmd_pass(const char *pass)
|
||||
|
||||
class InspIRCdProto : public IRCDProto
|
||||
{
|
||||
void SendAkillDel(const char *user, const char *host)
|
||||
void SendAkillDel(Akill *ak)
|
||||
{
|
||||
BotInfo *bi = findbot(Config.s_OperServ);
|
||||
send_cmd(bi->uid, "GLINE %s@%s", user, host);
|
||||
send_cmd(bi->uid, "GLINE %s@%s", ak->user, ak->host);
|
||||
}
|
||||
|
||||
void SendTopic(BotInfo *whosets, const char *chan, const char *whosetit, const char *topic, time_t when)
|
||||
void SendTopic(BotInfo *whosets, Channel *c, const char *whosetit, const char *topic)
|
||||
{
|
||||
send_cmd(whosets->uid, "FTOPIC %s %lu %s :%s", chan, static_cast<unsigned long>(when), whosetit, topic);
|
||||
send_cmd(whosets->uid, "FTOPIC %s %lu %s :%s", c->name, static_cast<unsigned long>(c->topic_time), whosetit, topic);
|
||||
}
|
||||
|
||||
void SendVhostDel(User *u)
|
||||
@@ -187,21 +187,19 @@ class InspIRCdProto : public IRCDProto
|
||||
}
|
||||
}
|
||||
|
||||
void SendAkill(const char *user, const char *host, const char *who, time_t when, time_t expires, const char *reason)
|
||||
void SendAkill(Akill *ak)
|
||||
{
|
||||
// Calculate the time left before this would expire, capping it at 2 days
|
||||
time_t timeleft = expires - time(NULL);
|
||||
if (timeleft > 172800 || !expires)
|
||||
time_t timeleft = ak->expires - time(NULL);
|
||||
if (timeleft > 172800 || !ak->expires)
|
||||
timeleft = 172800;
|
||||
BotInfo *bi = findbot(Config.s_OperServ);
|
||||
send_cmd(bi->uid, "ADDLINE G %s@%s %s %ld %ld :%s", user, host, who, static_cast<long>(time(NULL)), static_cast<long>(timeleft), reason);
|
||||
send_cmd(bi->uid, "ADDLINE G %s@%s %s %ld %ld :%s", ak->user, ak->host, ak->by, static_cast<long>(time(NULL)), static_cast<long>(timeleft), ak->reason);
|
||||
}
|
||||
|
||||
void SendSVSKillInternal(const char *source, const char *user, const char *buf)
|
||||
void SendSVSKillInternal(BotInfo *source, User *user, const char *buf)
|
||||
{
|
||||
BotInfo *bi = findbot(source);
|
||||
User *u = finduser(user);
|
||||
send_cmd(bi ? bi->uid : TS6SID, "KILL %s :%s", u ? u->GetUID().c_str(): user, buf);
|
||||
send_cmd(source ? source->uid : TS6SID, "KILL %s :%s", user->GetUID().c_str(), buf);
|
||||
}
|
||||
|
||||
void SendSVSMode(User *u, int ac, const char **av)
|
||||
@@ -236,18 +234,17 @@ class InspIRCdProto : public IRCDProto
|
||||
send_cmd(TS6SID, "UID %s %ld %s %s %s %s 0.0.0.0 %ld %s :%s", uid, static_cast<long>(time(NULL)), nick, host, host, user, static_cast<long>(time(NULL)), modes, real);
|
||||
}
|
||||
|
||||
void SendKickInternal(BotInfo *source, const char *chan, const char *user, const char *buf)
|
||||
void SendKickInternal(BotInfo *source, Channel *chan, User *user, const char *buf)
|
||||
{
|
||||
User *u = finduser(user);
|
||||
if (buf)
|
||||
send_cmd(source->uid, "KICK %s %s :%s", chan, u->GetUID().c_str(), buf);
|
||||
send_cmd(source->uid, "KICK %s %s :%s", chan->name, user->GetUID().c_str(), buf);
|
||||
else
|
||||
send_cmd(source->uid, "KICK %s %s :%s", chan, u->GetUID().c_str(), user);
|
||||
send_cmd(source->uid, "KICK %s %s :%s", chan->name, user->GetUID().c_str(), user->nick);
|
||||
}
|
||||
|
||||
void SendNoticeChanopsInternal(BotInfo *source, const char *dest, const char *buf)
|
||||
void SendNoticeChanopsInternal(BotInfo *source, Channel *dest, const char *buf)
|
||||
{
|
||||
send_cmd(TS6SID, "NOTICE @%s :%s", dest, buf);
|
||||
send_cmd(TS6SID, "NOTICE @%s :%s", dest->name, buf);
|
||||
}
|
||||
|
||||
/* SERVER services-dev.chatspike.net password 0 :Description here */
|
||||
@@ -282,11 +279,11 @@ class InspIRCdProto : public IRCDProto
|
||||
|
||||
/* Functions that use serval cmd functions */
|
||||
|
||||
void SendVhost(const char *nick, const char *vIdent, const char *vhost)
|
||||
void SendVhost(User *u, const char *vIdent, const char *vhost)
|
||||
{
|
||||
if (vIdent)
|
||||
inspircd_cmd_chgident(nick, vIdent);
|
||||
inspircd_cmd_chghost(nick, vhost);
|
||||
inspircd_cmd_chgident(u->nick, vIdent);
|
||||
inspircd_cmd_chghost(u->nick, vhost);
|
||||
}
|
||||
|
||||
void SendConnect()
|
||||
@@ -303,7 +300,7 @@ class InspIRCdProto : public IRCDProto
|
||||
{
|
||||
if (has_chgidentmod == 0)
|
||||
{
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "CHGIDENT not loaded!");
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "CHGIDENT not loaded!");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -327,15 +324,15 @@ class InspIRCdProto : public IRCDProto
|
||||
}
|
||||
|
||||
/* UNSZLINE */
|
||||
void SendSZLineDel(const char *mask)
|
||||
void SendSZLineDel(SXLine *sx)
|
||||
{
|
||||
send_cmd(TS6SID, "DELLINE Z %s", mask);
|
||||
send_cmd(TS6SID, "DELLINE Z %s", sx->mask);
|
||||
}
|
||||
|
||||
/* SZLINE */
|
||||
void SendSZLine(const char *mask, const char *reason, const char *whom)
|
||||
void SendSZLine(SXLine *sx)
|
||||
{
|
||||
send_cmd(TS6SID, "ADDLINE Z %s %s %ld 0 :%s", mask, whom, static_cast<long>(time(NULL)), reason);
|
||||
send_cmd(TS6SID, "ADDLINE Z %s %s %ld 0 :%s", sx->mask, sx->by, static_cast<long>(time(NULL)), sx->reason);
|
||||
}
|
||||
|
||||
/* SVSMODE -r */
|
||||
@@ -370,16 +367,12 @@ class InspIRCdProto : public IRCDProto
|
||||
send_cmd(TS6SID, "ENDBURST");
|
||||
}
|
||||
|
||||
void SendGlobopsInternal(const char *source, const char *buf)
|
||||
void SendGlobopsInternal(BotInfo *source, const char *buf)
|
||||
{
|
||||
BotInfo *bi = findbot(source);
|
||||
if (bi)
|
||||
{
|
||||
if (has_globopsmod)
|
||||
send_cmd(ircd->ts6 ? bi->uid : bi->nick, "SNONOTICE g :%s", buf);
|
||||
else
|
||||
send_cmd(ircd->ts6 ? bi->uid : bi->nick, "SNONOTICE A :%s", buf);
|
||||
}
|
||||
if (has_globopsmod)
|
||||
send_cmd(source ? source->uid : TS6SID, "SNONOTICE g :%s", buf);
|
||||
else
|
||||
send_cmd(source ? source->uid : TS6SID, "SNONOTICE A :%s", buf);
|
||||
}
|
||||
|
||||
void SendAccountLogin(User *u, NickCore *account)
|
||||
@@ -1079,18 +1072,18 @@ int anope_event_capab(const char *source, int ac, const char **av)
|
||||
}
|
||||
if (!has_hidechansmod) {
|
||||
send_cmd(NULL, "ERROR :m_hidechans.so is not loaded. This is required by Anope");
|
||||
quitmsg = "ERROR: Remote server deos not have the m_hidechans module loaded, and this is required.";
|
||||
quitmsg = "ERROR: Remote server does not have the m_hidechans module loaded, and this is required.";
|
||||
quitting = 1;
|
||||
return MOD_STOP;
|
||||
}
|
||||
if (!has_svsholdmod) {
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "SVSHOLD missing, Usage disabled until module is loaded.");
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "SVSHOLD missing, Usage disabled until module is loaded.");
|
||||
}
|
||||
if (!has_chghostmod) {
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "CHGHOST missing, Usage disabled until module is loaded.");
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "CHGHOST missing, Usage disabled until module is loaded.");
|
||||
}
|
||||
if (!has_chgidentmod) {
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "CHGIDENT missing, Usage disabled until module is loaded.");
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "CHGIDENT missing, Usage disabled until module is loaded.");
|
||||
}
|
||||
if (has_messagefloodmod) {
|
||||
ModeManager::AddChannelMode('f', new ChannelModeFlood());
|
||||
|
||||
+21
-39
@@ -165,18 +165,12 @@ void ratbox_cmd_pass(const char *pass)
|
||||
|
||||
class RatboxProto : public IRCDTS6Proto
|
||||
{
|
||||
void SendGlobopsInternal(const char *source, const char *buf)
|
||||
void SendGlobopsInternal(BotInfo *source, const char *buf)
|
||||
{
|
||||
if (source)
|
||||
{
|
||||
BotInfo *bi = findbot(source);
|
||||
if (bi)
|
||||
{
|
||||
send_cmd(bi->uid, "OPERWALL :%s", buf);
|
||||
return;
|
||||
}
|
||||
}
|
||||
send_cmd(TS6SID, "OPERWALL :%s", buf);
|
||||
send_cmd(source->uid, "OPERWALL :%s", buf);
|
||||
else
|
||||
send_cmd(TS6SID, "OPERWALL :%s", buf);
|
||||
}
|
||||
|
||||
void SendSQLine(const char *mask, const char *reason)
|
||||
@@ -184,22 +178,22 @@ class RatboxProto : public IRCDTS6Proto
|
||||
send_cmd(TS6SID, "RESV * %s :%s", mask, reason);
|
||||
}
|
||||
|
||||
void SendSGLineDel(const char *mask)
|
||||
void SendSGLineDel(SXLine *sx)
|
||||
{
|
||||
BotInfo *bi = findbot(Config.s_OperServ);
|
||||
send_cmd(bi ? bi->uid : Config.s_OperServ, "UNXLINE * %s", mask);
|
||||
send_cmd(bi ? bi->uid : Config.s_OperServ, "UNXLINE * %s", sx->mask);
|
||||
}
|
||||
|
||||
void SendSGLine(const char *mask, const char *reason)
|
||||
void SendSGLine(SXLine *sx)
|
||||
{
|
||||
BotInfo *bi = findbot(Config.s_OperServ);
|
||||
send_cmd(bi ? bi->uid : Config.s_OperServ, "XLINE * %s 0 :%s", mask, reason);
|
||||
send_cmd(bi ? bi->uid : Config.s_OperServ, "XLINE * %s 0 :%s", sx->mask, sx->reason);
|
||||
}
|
||||
|
||||
void SendAkillDel(const char *user, const char *host)
|
||||
void SendAkillDel(Akill *ak)
|
||||
{
|
||||
BotInfo *bi = findbot(Config.s_OperServ);
|
||||
send_cmd(bi ? bi->uid : Config.s_OperServ, "UNKLINE * %s %s", user, host);
|
||||
send_cmd(bi ? bi->uid : Config.s_OperServ, "UNKLINE * %s %s", ak->user, ak->host);
|
||||
}
|
||||
|
||||
void SendSQLineDel(const char *user)
|
||||
@@ -212,26 +206,15 @@ class RatboxProto : public IRCDTS6Proto
|
||||
send_cmd(NULL, "SJOIN %ld %s + :%s", static_cast<long>(chantime), channel, user->uid.c_str());
|
||||
}
|
||||
|
||||
/*
|
||||
oper: the nick of the oper performing the kline
|
||||
target.server: the server(s) this kline is destined for
|
||||
duration: the duration if a tkline, 0 if permanent.
|
||||
user: the 'user' portion of the kline
|
||||
host: the 'host' portion of the kline
|
||||
reason: the reason for the kline.
|
||||
*/
|
||||
|
||||
void SendAkill(const char *user, const char *host, const char *who, time_t when, time_t expires, const char *reason)
|
||||
void SendAkill(Akill *ak)
|
||||
{
|
||||
BotInfo *bi = findbot(Config.s_OperServ);
|
||||
send_cmd(bi ? bi->uid : Config.s_OperServ, "KLINE * %ld %s %s :%s", static_cast<long>(expires - time(NULL)), user, host, reason);
|
||||
send_cmd(bi ? bi->uid : Config.s_OperServ, "KLINE * %ld %s %s :%s", static_cast<long>(ak->expires - time(NULL)), ak->user, ak->host, ak->reason);
|
||||
}
|
||||
|
||||
void SendSVSKillInternal(const char *source, const char *user, const char *buf)
|
||||
void SendSVSKillInternal(BotInfo *source, User *user, const char *buf)
|
||||
{
|
||||
BotInfo *bi = findbot(source);
|
||||
User *u = find_byuid(user);
|
||||
send_cmd(bi ? bi->uid : source, "KILL %s :%s", u ? u->GetUID().c_str(): user, buf);
|
||||
send_cmd(source ? source->uid : TS6SID, "KILL %s :%s", user->GetUID().c_str(), buf);
|
||||
}
|
||||
|
||||
void SendSVSMode(User *u, int ac, const char **av)
|
||||
@@ -291,16 +274,15 @@ class RatboxProto : public IRCDTS6Proto
|
||||
send_cmd(TS6SID, "SVSMODE %s %s", u->nick, buf);
|
||||
}
|
||||
|
||||
void SendKickInternal(BotInfo *bi, const char *chan, const char *user, const char *buf)
|
||||
void SendKickInternal(BotInfo *bi, Channel *chan, User *user, const char *buf)
|
||||
{
|
||||
User *u = finduser(user);
|
||||
if (buf) send_cmd(bi->uid, "KICK %s %s :%s", chan, u ? u->GetUID().c_str() : user, buf);
|
||||
else send_cmd(bi->uid, "KICK %s %s", chan, u ? u->GetUID().c_str() : user);
|
||||
if (buf) send_cmd(bi->uid, "KICK %s %s :%s", chan->name, user->GetUID().c_str(), buf);
|
||||
else send_cmd(bi->uid, "KICK %s %s", chan->name, user->GetUID().c_str());
|
||||
}
|
||||
|
||||
void SendNoticeChanopsInternal(BotInfo *source, const char *dest, const char *buf)
|
||||
void SendNoticeChanopsInternal(BotInfo *source, Channel *dest, const char *buf)
|
||||
{
|
||||
send_cmd(NULL, "NOTICE @%s :%s", dest, buf);
|
||||
send_cmd(NULL, "NOTICE @%s :%s", dest->name, buf);
|
||||
}
|
||||
|
||||
/* QUIT */
|
||||
@@ -334,9 +316,9 @@ class RatboxProto : public IRCDTS6Proto
|
||||
return 1;
|
||||
}
|
||||
|
||||
void SendTopic(BotInfo *bi, const char *chan, const char *whosetit, const char *topic, time_t when)
|
||||
void SendTopic(BotInfo *bi, Channel *c, const char *whosetit, const char *topic)
|
||||
{
|
||||
send_cmd(bi->uid, "TOPIC %s :%s", chan, topic);
|
||||
send_cmd(bi->uid, "TOPIC %s :%s", c->name, topic);
|
||||
}
|
||||
|
||||
void SetAutoIdentificationToken(User *u)
|
||||
|
||||
+31
-39
@@ -174,14 +174,14 @@ class UnrealIRCdProto : public IRCDProto
|
||||
send_cmd(NULL, "f %s %s", server, set ? "+" : "-");
|
||||
}
|
||||
|
||||
void SendAkillDel(const char *user, const char *host)
|
||||
void SendAkillDel(Akill *ak)
|
||||
{
|
||||
send_cmd(NULL, "BD - G %s %s %s", user, host, Config.s_OperServ);
|
||||
send_cmd(NULL, "BD - G %s %s %s", ak->user, ak->host, Config.s_OperServ);
|
||||
}
|
||||
|
||||
void SendTopic(BotInfo *whosets, const char *chan, const char *whosetit, const char *topic, time_t when)
|
||||
void SendTopic(BotInfo *whosets, Channel *c, const char *whosetit, const char *topic)
|
||||
{
|
||||
send_cmd(whosets->nick, ") %s %s %lu :%s", chan, whosetit, static_cast<unsigned long>(when), topic);
|
||||
send_cmd(whosets->nick, ") %s %s %lu :%s", c->name, whosetit, static_cast<unsigned long>(c->topic_time), topic);
|
||||
}
|
||||
|
||||
void SendVhostDel(User *u)
|
||||
@@ -191,24 +191,17 @@ class UnrealIRCdProto : public IRCDProto
|
||||
u->SetMode(UMODE_CLOAK);
|
||||
}
|
||||
|
||||
void SendAkill(const char *user, const char *host, const char *who, time_t when, time_t expires, const char *reason)
|
||||
void SendAkill(Akill *ak)
|
||||
{
|
||||
// Calculate the time left before this would expire, capping it at 2 days
|
||||
time_t timeleft = expires - time(NULL);
|
||||
time_t timeleft = ak->expires - time(NULL);
|
||||
if (timeleft > 172800) timeleft = 172800;
|
||||
send_cmd(NULL, "BD + G %s %s %s %ld %ld :%s", user, host, who, static_cast<long>(time(NULL) + timeleft), static_cast<long>(when), reason);
|
||||
send_cmd(NULL, "BD + G %s %s %s %ld %ld :%s", ak->user, ak->host, ak->by, static_cast<long>(time(NULL) + timeleft), static_cast<long>(ak->expires), ak->reason);
|
||||
}
|
||||
|
||||
/*
|
||||
** svskill
|
||||
** parv[0] = servername
|
||||
** parv[1] = client
|
||||
** parv[2] = kill message
|
||||
*/
|
||||
void SendSVSKillInternal(const char *source, const char *user, const char *buf)
|
||||
void SendSVSKillInternal(BotInfo *source, User *user, const char *buf)
|
||||
{
|
||||
if (!source || !user || !buf) return;
|
||||
send_cmd(source, "h %s :%s", user, buf);
|
||||
send_cmd(source ? source->nick : Config.ServerName, "h %s :%s", user->nick, buf);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -246,16 +239,16 @@ class UnrealIRCdProto : public IRCDProto
|
||||
SendSQLine(nick, "Reserved for services");
|
||||
}
|
||||
|
||||
void SendKickInternal(BotInfo *source, const char *chan, const char *user, const char *buf)
|
||||
void SendKickInternal(BotInfo *source, Channel *chan, User *user, const char *buf)
|
||||
{
|
||||
if (buf) send_cmd(source->nick, "H %s %s :%s", chan, user, buf);
|
||||
else send_cmd(source->nick, "H %s %s", chan, user);
|
||||
if (buf) send_cmd(source->nick, "H %s %s :%s", chan->name, user->nick, buf);
|
||||
else send_cmd(source->nick, "H %s %s", chan->name, user->nick);
|
||||
}
|
||||
|
||||
void SendNoticeChanopsInternal(BotInfo *source, const char *dest, const char *buf)
|
||||
void SendNoticeChanopsInternal(BotInfo *source, Channel *dest, const char *buf)
|
||||
{
|
||||
if (!buf) return;
|
||||
send_cmd(source->nick, "B @%s :%s", dest, buf);
|
||||
send_cmd(source->nick, "B @%s :%s", dest->name, buf);
|
||||
}
|
||||
|
||||
/* SERVER name hop descript */
|
||||
@@ -321,11 +314,10 @@ class UnrealIRCdProto : public IRCDProto
|
||||
|
||||
/* Functions that use serval cmd functions */
|
||||
|
||||
void SendVhost(const char *nick, const char *vIdent, const char *vhost)
|
||||
void SendVhost(User *u, const char *vIdent, const char *vhost)
|
||||
{
|
||||
if (!nick) return;
|
||||
if (vIdent) unreal_cmd_chgident(nick, vIdent);
|
||||
unreal_cmd_chghost(nick, vhost);
|
||||
if (vIdent) unreal_cmd_chgident(u->nick, vIdent);
|
||||
unreal_cmd_chghost(u->nick, vhost);
|
||||
}
|
||||
|
||||
void SendConnect()
|
||||
@@ -356,48 +348,48 @@ class UnrealIRCdProto : public IRCDProto
|
||||
/*
|
||||
* SVSNLINE - :realname mask
|
||||
*/
|
||||
void SendSGLineDel(const char *mask)
|
||||
void SendSGLineDel(SXLine *sx)
|
||||
{
|
||||
send_cmd(NULL, "BR - :%s", mask);
|
||||
send_cmd(NULL, "BR - :%s", sx->mask);
|
||||
}
|
||||
|
||||
/* UNSZLINE */
|
||||
void SendSZLineDel(const char *mask)
|
||||
void SendSZLineDel(SXLine *sx)
|
||||
{
|
||||
send_cmd(NULL, "BD - Z * %s %s", mask, Config.s_OperServ);
|
||||
send_cmd(NULL, "BD - Z * %s %s", sx->mask, Config.s_OperServ);
|
||||
}
|
||||
|
||||
/* SZLINE */
|
||||
void SendSZLine(const char *mask, const char *reason, const char *whom)
|
||||
void SendSZLine(SXLine *sx)
|
||||
{
|
||||
send_cmd(NULL, "BD + Z * %s %s %ld %ld :%s", mask, whom, static_cast<long>(time(NULL) + 172800), static_cast<long>(time(NULL)), reason);
|
||||
send_cmd(NULL, "BD + Z * %s %s %ld %ld :%s", sx->mask, sx->by, static_cast<long>(time(NULL) + 172800), static_cast<long>(time(NULL)), sx->reason);
|
||||
}
|
||||
|
||||
/* SGLINE */
|
||||
/*
|
||||
* SVSNLINE + reason_where_is_space :realname mask with spaces
|
||||
*/
|
||||
void SendSGLine(const char *mask, const char *reason)
|
||||
void SendSGLine(SXLine *sx)
|
||||
{
|
||||
char edited_reason[BUFSIZE];
|
||||
strlcpy(edited_reason, reason, BUFSIZE);
|
||||
strlcpy(edited_reason, sx->reason, BUFSIZE);
|
||||
strnrepl(edited_reason, BUFSIZE, " ", "_");
|
||||
send_cmd(NULL, "BR + %s :%s", edited_reason, mask);
|
||||
send_cmd(NULL, "BR + %s :%s", edited_reason, sx->mask);
|
||||
}
|
||||
|
||||
/* SVSMODE -b */
|
||||
void SendBanDel(const char *name, const char *nick)
|
||||
void SendBanDel(Channel *c, const char *nick)
|
||||
{
|
||||
SendSVSModeChan(name, "-b", nick);
|
||||
SendSVSModeChan(c, "-b", nick);
|
||||
}
|
||||
|
||||
|
||||
/* SVSMODE channel modes */
|
||||
|
||||
void SendSVSModeChan(const char *name, const char *mode, const char *nick)
|
||||
void SendSVSModeChan(Channel *c, const char *mode, const char *nick)
|
||||
{
|
||||
if (nick) send_cmd(Config.ServerName, "n %s %s %s", name, mode, nick);
|
||||
else send_cmd(Config.ServerName, "n %s %s", name, mode);
|
||||
if (nick) send_cmd(Config.ServerName, "n %s %s %s", c->name, mode, nick);
|
||||
else send_cmd(Config.ServerName, "n %s %s", c->name, mode);
|
||||
}
|
||||
|
||||
/* svsjoin
|
||||
|
||||
+1
-1
@@ -91,7 +91,7 @@ ChannelInfo::~ChannelInfo()
|
||||
if (this->c)
|
||||
{
|
||||
if (this->bi && this->c->usercount >= Config.BSMinUsers)
|
||||
ircdproto->SendPart(this->bi, this->c->name, NULL);
|
||||
ircdproto->SendPart(this->bi, this->c, NULL);
|
||||
this->c->ci = NULL;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -99,9 +99,9 @@ void notice_server(char *source, Server * s, const char *fmt, ...)
|
||||
vsnprintf(buf, BUFSIZE - 1, fmt, args);
|
||||
|
||||
if (Config.NSDefFlags.HasFlag(NI_MSG)) {
|
||||
ircdproto->SendGlobalPrivmsg(findbot(source), s->name, buf);
|
||||
ircdproto->SendGlobalPrivmsg(findbot(source), s, buf);
|
||||
} else {
|
||||
ircdproto->SendGlobalNotice(findbot(source), s->name, buf);
|
||||
ircdproto->SendGlobalNotice(findbot(source), s, buf);
|
||||
}
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
+1
-1
@@ -458,7 +458,7 @@ void do_squit(const char *source, int ac, const char **av)
|
||||
{
|
||||
snprintf(buf, BUFSIZE, "Received SQUIT for juped server %s",
|
||||
s->name);
|
||||
ircdproto->SendGlobops(Config.s_OperServ, buf);
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), buf);
|
||||
}
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s %s", s->name,
|
||||
|
||||
+3
-3
@@ -163,7 +163,7 @@ int add_session(const char *nick, const char *host, char *hostip)
|
||||
add_akill(NULL, akillmask, Config.s_OperServ,
|
||||
time(NULL) + Config.SessionAutoKillExpiry,
|
||||
"Session limit exceeded");
|
||||
ircdproto->SendGlobops(Config.s_OperServ,
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ),
|
||||
"Added a temporary AKILL for \2%s\2 due to excessive connections",
|
||||
akillmask);
|
||||
}
|
||||
@@ -214,7 +214,7 @@ void del_session(const char *host)
|
||||
|
||||
if (!session) {
|
||||
if (debug) {
|
||||
ircdproto->SendGlobops(Config.s_OperServ,
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ),
|
||||
"WARNING: Tried to delete non-existant session: \2%s",
|
||||
host);
|
||||
alog("session: Tried to delete non-existant session: %s",
|
||||
@@ -261,7 +261,7 @@ void expire_exceptions()
|
||||
if (exceptions[i].expires == 0 || exceptions[i].expires > now)
|
||||
continue;
|
||||
if (Config.WallExceptionExpire)
|
||||
ircdproto->SendGlobops(Config.s_OperServ,
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ),
|
||||
"Session limit exception for %s has expired.",
|
||||
exceptions[i].mask);
|
||||
delete [] exceptions[i].mask;
|
||||
|
||||
+1
-1
@@ -1241,7 +1241,7 @@ void UserSetInternalModes(User *user, int ac, const char **av)
|
||||
{
|
||||
++opcnt;
|
||||
if (Config.WallOper)
|
||||
ircdproto->SendGlobops(Config.s_OperServ, "\2%s\2 is now an IRC operator.", user->nick);
|
||||
ircdproto->SendGlobops(findbot(Config.s_OperServ), "\2%s\2 is now an IRC operator.", user->nick);
|
||||
}
|
||||
else
|
||||
--opcnt;
|
||||
|
||||
Reference in New Issue
Block a user