diff options
| author | 2006-02-03 20:44:53 +0000 | |
|---|---|---|
| committer | 2006-02-03 20:44:53 +0000 | |
| commit | 93188e6f716d77c7e2162d086e230c73c77292f8 (patch) | |
| tree | 1d44269d9146a91a4496c4f7132159176a291d2a /src/cmd_userhost.cpp | |
| parent | Learnt how to speel Optimization (diff) | |
| download | inspircd++-93188e6f716d77c7e2162d086e230c73c77292f8.tar.gz inspircd++-93188e6f716d77c7e2162d086e230c73c77292f8.tar.bz2 inspircd++-93188e6f716d77c7e2162d086e230c73c77292f8.zip | |
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/cmd_userhost.cpp')
| -rw-r--r-- | src/cmd_userhost.cpp | 6 |
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); |
