summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-03 20:44:53 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-03 20:44:53 +0000
commit93188e6f716d77c7e2162d086e230c73c77292f8 (patch)
tree1d44269d9146a91a4496c4f7132159176a291d2a /src
parentb5b69ec0b56d3e0a8d07bba3a39bce58c4bc6a73 (diff)
Optimized: strchr(x->modes,'o') has the same effect as (*x->oper) but *x->oper is potentially hundreds of times faster :p
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3065 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/cmd_userhost.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd_userhost.cpp b/src/cmd_userhost.cpp
index afe1a4358..aa4d3de3e 100644
--- a/src/cmd_userhost.cpp
+++ b/src/cmd_userhost.cpp
@@ -72,13 +72,13 @@ void cmd_userhost::Handle (char **parameters, int pcnt, userrec *user)
userrec *u = Find(parameters[i]);
if(u)
{
- if(strchr(u->modes,'o'))
- if(strchr(user->modes, 'o'))
+ if(*u->oper)
+ if(*user->oper)
snprintf(junk,MAXBUF,"%s*=+%s@%s ",u->nick,u->ident,u->host);
else
snprintf(junk,MAXBUF,"%s*=+%s@%s ",u->nick,u->ident,u->dhost);
else
- if(strchr(user->modes, 'o'))
+ if(*user->oper)
snprintf(junk,MAXBUF,"%s=+%s@%s ",u->nick,u->ident,u->host);
else
snprintf(junk,MAXBUF,"%s=+%s@%s ",u->nick,u->ident,u->dhost);