]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/cmd_who.cpp
Decide that it wasn't quite appropriate :(
[user/henk/code/inspircd.git] / src / cmd_who.cpp
index 843507b5779f47c2030e98750b6a768cef4baddf..ecb52ea293c1c1d51a646f63b06e0b9f0457bc8b 100644 (file)
@@ -88,10 +88,9 @@ void cmd_who::Handle (char **parameters, int pcnt, userrec *user)
                                                } else {
                                                        strlcat(tmp, "H", 9);
                                                }
-                                               if (strchr(i->second->modes,'o')) { strlcat(tmp, "*", 9); }
+                                               if (*i->second->oper) { strlcat(tmp, "*", 9); }
                                                WriteServ(user->fd,"352 %s %s %s %s %s %s %s :0 %s",user->nick, Ptr ? Ptr->name : "*", i->second->ident, i->second->dhost, i->second->server, i->second->nick, tmp, i->second->fullname);
-                                               n_list++;
-                                               if (n_list > Config->MaxWhoResults)
+                                               if (n_list++ > Config->MaxWhoResults)
                                                {
                                                        WriteServ(user->fd,"523 %s WHO :Command aborted: More results than configured limit",user->nick);
                                                        break;
@@ -126,7 +125,7 @@ void cmd_who::Handle (char **parameters, int pcnt, userrec *user)
                                                } else {
                                                        strlcat(tmp, "H", 9);
                                                }
-                                               if (strchr(i->second->modes,'o')) { strlcat(tmp, "*", 9); }
+                                               if (*i->second->oper) { strlcat(tmp, "*", 9); }
                                                strlcat(tmp, cmode(i->second, Ptr),5);
                                                WriteServ(user->fd,"352 %s %s %s %s %s %s %s :0 %s",user->nick, Ptr->name, i->second->ident, i->second->dhost, i->second->server, i->second->nick, tmp, i->second->fullname);
                                                 n_list++;
@@ -157,7 +156,7 @@ void cmd_who::Handle (char **parameters, int pcnt, userrec *user)
                                } else {
                                        strlcat(tmp, "H" ,9);
                                }
-                               if (strchr(u->modes,'o')) { strlcat(tmp, "*" ,9); }
+                               if (*u->oper) { strlcat(tmp, "*" ,9); }
                                WriteServ(user->fd,"352 %s %s %s %s %s %s %s :0 %s",user->nick, u->chans.size() && u->chans[0].channel ? u->chans[0].channel->name
                                 : "*", u->ident, u->dhost, u->server, u->nick, tmp, u->fullname);
                        }