summaryrefslogtreecommitdiff
path: root/modules/commands/greet.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-05-28 12:07:29 -0400
committerAdam <Adam@anope.org>2014-05-28 12:07:54 -0400
commitf29e1cf383529a1a29f02b0669d973f5ee0b7a66 (patch)
tree3c33db276dc9328235bbd572641521ed44458176 /modules/commands/greet.cpp
parent1253c70e0682fa1490c99c3d2869049a0e3fa2e0 (diff)
Move most of the core pseudoclient logic to modules
Diffstat (limited to 'modules/commands/greet.cpp')
-rw-r--r--modules/commands/greet.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/commands/greet.cpp b/modules/commands/greet.cpp
index cacda2d3c..e35ba5b19 100644
--- a/modules/commands/greet.cpp
+++ b/modules/commands/greet.cpp
@@ -25,7 +25,7 @@ class CommandBSSetGreet : public Command
void Execute(CommandSource &source, const std::vector<Anope::string> &params) override
{
- ChannelInfo *ci = ChannelInfo::Find(params[0]);
+ ChanServ::Channel *ci = ChanServ::Find(params[0]);
const Anope::string &value = params[1];
if (ci == NULL)
@@ -49,7 +49,7 @@ class CommandBSSetGreet : public Command
if (value.equals_ci("ON"))
{
bool override = !source.AccessFor(ci).HasPriv("SET");
- Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to enable greets";
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to enable greets";
ci->Extend<bool>("BS_GREET");
source.Reply(_("Greet mode is now \002on\002 on channel %s."), ci->name.c_str());
@@ -57,7 +57,7 @@ class CommandBSSetGreet : public Command
else if (value.equals_ci("OFF"))
{
bool override = !source.AccessFor(ci).HasPriv("SET");
- Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to disable greets";
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to disable greets";
ci->Shrink<bool>("BS_GREET");
source.Reply(_("Greet mode is now \002off\002 on channel %s."), ci->name.c_str());
@@ -95,13 +95,13 @@ class CommandNSSetGreet : public Command
return;
}
- const NickAlias *na = NickAlias::Find(user);
+ const NickServ::Nick *na = NickServ::FindNick(user);
if (!na)
{
source.Reply(NICK_X_NOT_REGISTERED, user.c_str());
return;
}
- NickCore *nc = na->nc;
+ NickServ::Account *nc = na->nc;
EventReturn MOD_RESULT = Event::OnSetNickOption(&Event::SetNickOption::OnSetNickOption, source, this, nc, param);
if (MOD_RESULT == EVENT_STOP)
@@ -208,14 +208,14 @@ class Greet : public Module
}
}
- void OnNickInfo(CommandSource &source, NickAlias *na, InfoFormatter &info, bool show_hidden) override
+ void OnNickInfo(CommandSource &source, NickServ::Nick *na, InfoFormatter &info, bool show_hidden) override
{
Anope::string *greet = ns_greet.Get(na->nc);
if (greet != NULL)
info[_("Greet")] = *greet;
}
- void OnBotInfo(CommandSource &source, BotInfo *bi, ChannelInfo *ci, InfoFormatter &info) override
+ void OnBotInfo(CommandSource &source, BotInfo *bi, ChanServ::Channel *ci, InfoFormatter &info) override
{
if (bs_greet.HasExt(ci))
info.AddOption(_("Greet"));