summaryrefslogtreecommitdiff
path: root/src/cmd_trace.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd_trace.cpp')
-rw-r--r--src/cmd_trace.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/cmd_trace.cpp b/src/cmd_trace.cpp
index 23a72f199..1c968c8a8 100644
--- a/src/cmd_trace.cpp
+++ b/src/cmd_trace.cpp
@@ -22,28 +22,27 @@ extern "C" command_t* init_command(InspIRCd* Instance)
return new cmd_trace(Instance);
}
+/** XXX: This is crap. someone fix this when you have time, to be more useful.
+ */
CmdResult cmd_trace::Handle (const char** parameters, int pcnt, userrec *user)
{
for (user_hash::iterator i = ServerInstance->clientlist->begin(); i != ServerInstance->clientlist->end(); i++)
{
- if (i->second)
+ if (i->second->registered == REG_ALL)
{
- if (ServerInstance->IsNick(i->second->nick))
+ if (*i->second->oper)
{
- if (*i->second->oper)
- {
- user->WriteServ("205 %s :Oper 0 %s",user->nick,i->second->nick);
- }
- else
- {
- user->WriteServ("204 %s :User 0 %s",user->nick,i->second->nick);
- }
+ user->WriteServ("205 %s :Oper 0 %s",user->nick,i->second->nick);
}
else
{
- user->WriteServ("203 %s :???? 0 [%s]",user->nick,i->second->host);
+ user->WriteServ("204 %s :User 0 %s",user->nick,i->second->nick);
}
}
+ else
+ {
+ user->WriteServ("203 %s :???? 0 [%s]",user->nick,i->second->host);
+ }
}
return CMD_SUCCESS;
}