X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcmd_who.cpp;h=bd9457d6f01fa77bba4786b25082d7dd272f3947;hb=1552f3918ac0dad7fef9b86b70c0f4a63d4e37a7;hp=725d19bb7863d7dd7af336b18222e1708878d9ab;hpb=2a80ef7eaf25535c7688d7859bbe5451508dc194;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/cmd_who.cpp b/src/cmd_who.cpp index 725d19bb7..bd9457d6f 100644 --- a/src/cmd_who.cpp +++ b/src/cmd_who.cpp @@ -1,15 +1,12 @@ -/* +------------------------------------+ - * | Inspire Internet Relay Chat Daemon | - * +------------------------------------+ +/* +------------------------------------+ + * | Inspire Internet Relay Chat Daemon | + * +------------------------------------+ * - * InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev. - * E-mail: - * - * + * InspIRCd: (C) 2002-2007 InspIRCd Development Team + * See: http://www.inspircd.org/wiki/index.php/Credits * - * Written by Craig Edwards, Craig McLure, and others. * This program is free but copyrighted software; see - *the file COPYING for details. + * the file COPYING for details. * * --------------------------------------------------- */ @@ -23,15 +20,11 @@ /* get the last 'visible' chan of a user */ static char *getlastchanname(userrec *u) { - for (std::vector::const_iterator v = u->chans.begin(); v != u->chans.end(); v++) + UCListIter i = u->chans.begin(); + if (i != u->chans.end()) { - ucrec* temp = (ucrec*)*v; - - if (temp->channel) - { - if (!temp->channel->IsModeSet('s')) - return temp->channel->name; - } + if (!i->first->IsModeSet('s')) + return i->first->name; } return "*";