summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/cs_ban.c5
-rw-r--r--src/core/cs_clear.c8
-rw-r--r--src/core/cs_drop.c2
-rw-r--r--src/core/cs_forbid.c4
-rw-r--r--src/core/cs_kick.c4
-rw-r--r--src/core/cs_set.c2
-rw-r--r--src/core/cs_suspend.c6
-rw-r--r--src/core/cs_topic.c4
-rw-r--r--src/core/hs_on.c2
-rw-r--r--src/core/ns_drop.c4
-rw-r--r--src/core/ns_forbid.c2
-rw-r--r--src/core/ns_getpass.c4
-rw-r--r--src/core/ns_saset.c2
-rw-r--r--src/core/ns_suspend.c4
-rw-r--r--src/core/os_akill.c2
-rw-r--r--src/core/os_chankill.c2
-rw-r--r--src/core/os_clearmodes.c12
-rw-r--r--src/core/os_defcon.c6
-rw-r--r--src/core/os_global.c2
-rw-r--r--src/core/os_jupe.c2
-rw-r--r--src/core/os_kick.c13
-rw-r--r--src/core/os_mode.c2
-rw-r--r--src/core/os_noop.c2
-rw-r--r--src/core/os_oline.c4
-rw-r--r--src/core/os_set.c6
-rw-r--r--src/core/os_sgline.c2
-rw-r--r--src/core/os_sqline.c2
-rw-r--r--src/core/os_svsnick.c7
-rw-r--r--src/core/os_szline.c2
-rw-r--r--src/core/os_umode.c2
30 files changed, 64 insertions, 57 deletions
diff --git a/src/core/cs_ban.c b/src/core/cs_ban.c
index 81a1c5124..f6fb4f092 100644
--- a/src/core/cs_ban.c
+++ b/src/core/cs_ban.c
@@ -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;
diff --git a/src/core/cs_clear.c b/src/core/cs_clear.c
index fa82c9f11..cc8208829 100644
--- a/src/core/cs_clear.c
+++ b/src/core/cs_clear.c
@@ -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];
diff --git a/src/core/cs_drop.c b/src/core/cs_drop.c
index 561f79e6f..82ffc2a1f 100644
--- a/src/core/cs_drop.c
+++ b/src/core/cs_drop.c
@@ -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);
diff --git a/src/core/cs_forbid.c b/src/core/cs_forbid.c
index 61b045cd9..9c1690fe2 100644
--- a/src/core/cs_forbid.c
+++ b/src/core/cs_forbid.c
@@ -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)
{
diff --git a/src/core/cs_kick.c b/src/core/cs_kick.c
index 5239d53cb..93d42620a 100644
--- a/src/core/cs_kick.c
+++ b/src/core/cs_kick.c
@@ -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;
diff --git a/src/core/cs_set.c b/src/core/cs_set.c
index 40cdd287d..1ac511e17 100644
--- a/src/core/cs_set.c
+++ b/src/core/cs_set.c
@@ -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;
diff --git a/src/core/cs_suspend.c b/src/core/cs_suspend.c
index ddad30930..8976ba745 100644
--- a/src/core/cs_suspend.c
+++ b/src/core/cs_suspend.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);
diff --git a/src/core/cs_topic.c b/src/core/cs_topic.c
index d570fa827..2187a61e1 100644
--- a/src/core/cs_topic.c
+++ b/src/core/cs_topic.c
@@ -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;
}
diff --git a/src/core/hs_on.c b/src/core/hs_on.c
index 985ce3e13..aaddbf28d 100644
--- a/src/core/hs_on.c
+++ b/src/core/hs_on.c
@@ -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)
diff --git a/src/core/ns_drop.c b/src/core/ns_drop.c
index 096fb09af..064390cbd 100644
--- a/src/core/ns_drop.c
+++ b/src/core/ns_drop.c
@@ -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
diff --git a/src/core/ns_forbid.c b/src/core/ns_forbid.c
index 68deea161..f45dadceb 100644
--- a/src/core/ns_forbid.c
+++ b/src/core/ns_forbid.c
@@ -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);
diff --git a/src/core/ns_getpass.c b/src/core/ns_getpass.c
index ac52ccac9..8f4600814 100644
--- a/src/core/ns_getpass.c
+++ b/src/core/ns_getpass.c
@@ -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
diff --git a/src/core/ns_saset.c b/src/core/ns_saset.c
index 54f0608b0..28ba915bd 100644
--- a/src/core/ns_saset.c
+++ b/src/core/ns_saset.c
@@ -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;
}
diff --git a/src/core/ns_suspend.c b/src/core/ns_suspend.c
index c7a1690ae..330e96222 100644
--- a/src/core/ns_suspend.c
+++ b/src/core/ns_suspend.c
@@ -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);
diff --git a/src/core/os_akill.c b/src/core/os_akill.c
index ae36ad5da..7561cb0e6 100644
--- a/src/core/os_akill.c
+++ b/src/core/os_akill.c
@@ -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)
diff --git a/src/core/os_chankill.c b/src/core/os_chankill.c
index acd734deb..d4003412f 100644
--- a/src/core/os_chankill.c
+++ b/src/core/os_chankill.c
@@ -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);
diff --git a/src/core/os_clearmodes.c b/src/core/os_clearmodes.c
index d2e136983..d35faa3ae 100644
--- a/src/core/os_clearmodes.c
+++ b/src/core/os_clearmodes.c
@@ -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)
diff --git a/src/core/os_defcon.c b/src/core/os_defcon.c
index 326149bcb..4b427d602 100644
--- a/src/core/os_defcon.c
+++ b/src/core/os_defcon.c
@@ -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);
}
}
}
diff --git a/src/core/os_global.c b/src/core/os_global.c
index 447c5fd5c..c311f0809 100644
--- a/src/core/os_global.c
+++ b/src/core/os_global.c
@@ -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;
}
diff --git a/src/core/os_jupe.c b/src/core/os_jupe.c
index 9c809c670..63274e4fc 100644
--- a/src/core/os_jupe.c
+++ b/src/core/os_jupe.c
@@ -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;
}
diff --git a/src/core/os_kick.c b/src/core/os_kick.c
index 724a12c79..ea2b529de 100644
--- a/src/core/os_kick.c
+++ b/src/core/os_kick.c
@@ -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];
diff --git a/src/core/os_mode.c b/src/core/os_mode.c
index af19bb6d5..beb225a0c 100644
--- a/src/core/os_mode.c
+++ b/src/core/os_mode.c
@@ -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;
}
diff --git a/src/core/os_noop.c b/src/core/os_noop.c
index 91194b02b..86d454d3b 100644
--- a/src/core/os_noop.c
+++ b/src/core/os_noop.c
@@ -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 */
diff --git a/src/core/os_oline.c b/src/core/os_oline.c
index 883f9344e..d8c407ee5 100644
--- a/src/core/os_oline.c
+++ b/src/core/os_oline.c
@@ -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, "");
diff --git a/src/core/os_set.c b/src/core/os_set.c
index 01bbd5f5b..745da0e47 100644
--- a/src/core/os_set.c
+++ b/src/core/os_set.c
@@ -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);
diff --git a/src/core/os_sgline.c b/src/core/os_sgline.c
index 6f9632eb8..a8563e1b2 100644
--- a/src/core/os_sgline.c
+++ b/src/core/os_sgline.c
@@ -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)
diff --git a/src/core/os_sqline.c b/src/core/os_sqline.c
index b4018bcd0..9fe786d36 100644
--- a/src/core/os_sqline.c
+++ b/src/core/os_sqline.c
@@ -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)
diff --git a/src/core/os_svsnick.c b/src/core/os_svsnick.c
index b86caf601..67059fb80 100644
--- a/src/core/os_svsnick.c
+++ b/src/core/os_svsnick.c
@@ -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;
}
diff --git a/src/core/os_szline.c b/src/core/os_szline.c
index 9beea2bc7..4b1661077 100644
--- a/src/core/os_szline.c
+++ b/src/core/os_szline.c
@@ -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)
diff --git a/src/core/os_umode.c b/src/core/os_umode.c
index 6f86dbd44..bf4faa34a 100644
--- a/src/core/os_umode.c
+++ b/src/core/os_umode.c
@@ -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;
}