From 93188e6f716d77c7e2162d086e230c73c77292f8 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 3 Feb 2006 20:44:53 +0000 Subject: 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 --- src/cmd_userhost.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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); -- cgit v1.2.3