]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/cmd_who.cpp
Jesus, look who's the commit whore today. More header updates, and removal of namespa...
[user/henk/code/inspircd.git] / src / cmd_who.cpp
index 725d19bb7863d7dd7af336b18222e1708878d9ab..bd9457d6f01fa77bba4786b25082d7dd272f3947 100644 (file)
@@ -1,15 +1,12 @@
-/*   +------------------------------------+
- *   | Inspire Internet Relay Chat Daemon |
- *   +------------------------------------+
+/*       +------------------------------------+
+ *       | Inspire Internet Relay Chat Daemon |
+ *       +------------------------------------+
  *
- *  InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
- *   E-mail:
- *<brain@chatspike.net>
- *<Craig@chatspike.net>
+ *  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.
  *
  * ---------------------------------------------------
  */
 /* get the last 'visible' chan of a user */
 static char *getlastchanname(userrec *u)
 {
-       for (std::vector<ucrec*>::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 "*";