-/** Handle /SPYLIST
- */
-class CommandSpylist : public Command
-{
- public:
- CommandSpylist (InspIRCd* Instance) : Command(Instance,"SPYLIST", 'o', 0)
- {
- this->source = "m_spy.so";
- syntax.clear();
- }
-
- CmdResult Handle (const char** parameters, int pcnt, User *user)
- {
- ServerInstance->WriteOpers("*** Oper %s used SPYLIST to list +s/+p channels and keys.",user->nick);
- user->WriteServ("321 %s Channel :Users Name",user->nick);
- for (chan_hash::const_iterator i = ServerInstance->chanlist->begin(); i != ServerInstance->chanlist->end(); i++)
- {
- if (pcnt && !match(i->second->name, parameters[0]))
- continue;
- user->WriteServ("322 %s %s %d :[+%s] %s",user->nick,i->second->name,i->second->GetUserCounter(),i->second->ChanModes(true),i->second->topic);
- }
- user->WriteServ("323 %s :End of channel list.",user->nick);
-
- /* Dont send out across the network */
- return CMD_LOCALONLY;
- }
-};
-