diff options
57 files changed, 332 insertions, 377 deletions
@@ -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) diff --git a/include/services.h b/include/services.h index 190529987..8a5585973 100644 --- a/include/services.h +++ b/include/services.h @@ -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 *) { } diff --git a/src/actions.c b/src/actions.c index 37bf95798..76ddb435b 100644 --- a/src/actions.c +++ b/src/actions.c @@ -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) diff --git a/src/bots.cpp b/src/bots.cpp index ff439e6d4..cae202bf2 100644 --- a/src/bots.cpp +++ b/src/bots.cpp @@ -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--; diff --git a/src/botserv.c b/src/botserv.c index 9a8229d6c..9dc7e3ed1 100644 --- a/src/botserv.c +++ b/src/botserv.c @@ -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])); } diff --git a/src/channels.c b/src/channels.c index 2115d2658..997432d88 100644 --- a/src/channels.c +++ b/src/channels.c @@ -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 */ diff --git a/src/chanserv.c b/src/chanserv.c index c85efc259..941925b1b 100644 --- a/src/chanserv.c +++ b/src/chanserv.c @@ -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; 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); + i |
