diff options
author | Adam <Adam@anope.org> | 2014-05-28 12:07:29 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2014-05-28 12:07:54 -0400 |
commit | f29e1cf383529a1a29f02b0669d973f5ee0b7a66 (patch) | |
tree | 3c33db276dc9328235bbd572641521ed44458176 /modules/commands/bs_info.cpp | |
parent | 1253c70e0682fa1490c99c3d2869049a0e3fa2e0 (diff) |
Move most of the core pseudoclient logic to modules
Diffstat (limited to 'modules/commands/bs_info.cpp')
-rw-r--r-- | modules/commands/bs_info.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/modules/commands/bs_info.cpp b/modules/commands/bs_info.cpp index 49775a053..88ac15a48 100644 --- a/modules/commands/bs_info.cpp +++ b/modules/commands/bs_info.cpp @@ -20,18 +20,13 @@ class CommandBSInfo : public Command void send_bot_channels(std::vector<Anope::string> &buffers, const BotInfo *bi) { Anope::string buf; - for (registered_channel_map::const_iterator it = RegisteredChannelList->begin(), it_end = RegisteredChannelList->end(); it != it_end; ++it) + for (ChanServ::Channel *ci : bi->GetChannels()) { - const ChannelInfo *ci = it->second; - - if (ci->bi == bi) + buf += " " + ci->name + " "; + if (buf.length() > 300) { - buf += " " + ci->name + " "; - if (buf.length() > 300) - { - buffers.push_back(buf); - buf.clear(); - } + buffers.push_back(buf); + buf.clear(); } } if (!buf.empty()) @@ -51,7 +46,7 @@ class CommandBSInfo : public Command const Anope::string &query = params[0]; BotInfo *bi = BotInfo::Find(query, true); - ChannelInfo *ci = ChannelInfo::Find(query); + ChanServ::Channel *ci = ChanServ::Find(query); InfoFormatter info(source.nc); if (bi) |