diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-15 19:23:01 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-15 19:23:01 +0000 |
commit | feaf72ecb48470114fbe3f3058b5f4b9622b88a5 (patch) | |
tree | 838377c1155b6fdb00460d6e52ffcb4bdf17f053 /src/commands.cpp | |
parent | d715c1936e96ce05d9cc4eea2fd4afab3ad02539 (diff) |
Removed a whole lot of strchr's looking for mode +o where we can do if *user->oper
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3221 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/commands.cpp')
-rw-r--r-- | src/commands.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/commands.cpp b/src/commands.cpp index 5cb5af2ad..00f44c74a 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -118,7 +118,7 @@ void do_whois(userrec* user, userrec* dest,unsigned long signon, unsigned long i if (dest->registered == 7) { WriteServ(user->fd,"311 %s %s %s %s * :%s",user->nick, dest->nick, dest->ident, dest->dhost, dest->fullname); - if ((user == dest) || (strchr(user->modes,'o'))) + if ((user == dest) || (*user->oper)) { WriteServ(user->fd,"378 %s %s :is connecting from *@%s %s",user->nick, dest->nick, dest->host, (char*)inet_ntoa(dest->ip4)); } @@ -146,16 +146,9 @@ void do_whois(userrec* user, userrec* dest,unsigned long signon, unsigned long i { WriteServ(user->fd,"301 %s %s :%s",user->nick, dest->nick, dest->awaymsg); } - if (strchr(dest->modes,'o')) + if (*dest->oper) { - if (*dest->oper) - { - WriteServ(user->fd,"313 %s %s :is %s %s on %s",user->nick, dest->nick, (strchr("aeiou",dest->oper[0]) ? "an" : "a"),dest->oper, Config->Network); - } - else - { - WriteServ(user->fd,"313 %s %s :is an IRC operator",user->nick, dest->nick); - } + WriteServ(user->fd,"313 %s %s :is %s %s on %s",user->nick, dest->nick, (strchr("aeiou",*dest->oper) ? "an" : "a"),dest->oper, Config->Network); } if ((!signon) && (!idle)) { |