diff options
author | Adam <Adam@anope.org> | 2012-06-18 05:04:30 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-06-18 05:04:30 -0400 |
commit | 2dec8e767a70def4b9b04a96ae4f75e4d1013038 (patch) | |
tree | 36f5b551ff359a578e17d5e7d2f486970d759a7b /modules/commands/ns_ajoin.cpp | |
parent | 873d4287de57f7f9caa23cb2c9265d1ad2804aba (diff) |
Allow userless command sources
Diffstat (limited to 'modules/commands/ns_ajoin.cpp')
-rw-r--r-- | modules/commands/ns_ajoin.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/commands/ns_ajoin.cpp b/modules/commands/ns_ajoin.cpp index e17f958d0..5a33fb7db 100644 --- a/modules/commands/ns_ajoin.cpp +++ b/modules/commands/ns_ajoin.cpp @@ -82,11 +82,11 @@ class CommandNSAJoin : public Command { void DoList(CommandSource &source, const std::vector<Anope::string> ¶ms) { - AJoinList *channels = source.u->Account()->GetExt<AJoinList *>("ns_ajoin_channels"); + AJoinList *channels = source.nc->GetExt<AJoinList *>("ns_ajoin_channels"); if (channels == NULL) { channels = new AJoinList(); - source.u->Account()->Extend("ns_ajoin_channels", channels); + source.nc->Extend("ns_ajoin_channels", channels); } if ((*channels)->empty()) @@ -117,11 +117,11 @@ class CommandNSAJoin : public Command void DoAdd(CommandSource &source, const std::vector<Anope::string> ¶ms) { - AJoinList *channels = source.u->Account()->GetExt<AJoinList *>("ns_ajoin_channels"); + AJoinList *channels = source.nc->GetExt<AJoinList *>("ns_ajoin_channels"); if (channels == NULL) { channels = new AJoinList(); - source.u->Account()->Extend("ns_ajoin_channels", channels); + source.nc->Extend("ns_ajoin_channels", channels); } unsigned i = 0; @@ -138,7 +138,7 @@ class CommandNSAJoin : public Command else { AJoinEntry *entry = new AJoinEntry(); - entry->owner = source.u->Account(); + entry->owner = source.nc; entry->channel = params[1]; entry->key = params.size() > 2 ? params[2] : ""; (*channels)->push_back(entry); @@ -148,11 +148,11 @@ class CommandNSAJoin : public Command void DoDel(CommandSource &source, const std::vector<Anope::string> ¶ms) { - AJoinList *channels = source.u->Account()->GetExt<AJoinList *>("ns_ajoin_channels"); + AJoinList *channels = source.nc->GetExt<AJoinList *>("ns_ajoin_channels"); if (channels == NULL) { channels = new AJoinList(); - source.u->Account()->Extend("ns_ajoin_channels", channels); + source.nc->Extend("ns_ajoin_channels", channels); } unsigned i = 0; |