summaryrefslogtreecommitdiff
path: root/src/cmd_trace.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-02-19 10:56:51 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-02-19 10:56:51 +0000
commit5d03b5379f474a70f40f165707dde93161fb3d59 (patch)
tree3d7c889bbb57894148fe1935aa08ef8e2c751d73 /src/cmd_trace.cpp
parentd3a50da5c09fd7f726ebe0b55bc79bbf8e5783c0 (diff)
Too many small tweaks to list. Most notably tidy up info, note that /trace is crap, and improve efficiency of cmd_nick
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6601 e03df62e-2008-0410-955e-edbf42e46eb7
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;
}