]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_operwho.cpp
Warning fixes
[user/henk/code/inspircd.git] / src / modules / m_operwho.cpp
index 15ff74c6d4be96761c6e0f8223b0c3eb10d26019..7842fd08fd8251add58941a0b4cc81db4e46f885 100644 (file)
 
 using namespace std;
 
-/*
- * DEVOICE module for InspIRCd
- *  Syntax: /DEVOICE <#chan>
- */
-
 /* $ModDesc: Provides an extended version of /WHO for opers */
 
 #include "inspircd_config.h"
@@ -41,6 +36,7 @@ using namespace std;
 #include "globals.h"
 #include "modules.h"
 #include "helperfuncs.h"
+#include "message.h"
 #include "hashcomp.h"
 #include "typedefs.h"
 
@@ -97,7 +93,6 @@ class ModuleOperWho : public Module
                        {
                                if ((user->chans.size()) && (user->chans[0].channel))
                                {
-                                       int n_list = 0;
                                        for (user_hash::const_iterator i = clientlist.begin(); i != clientlist.end(); i++)
                                        {
                                                Ptr = i->second->chans[0].channel;
@@ -131,7 +126,6 @@ class ModuleOperWho : public Module
                                Ptr = FindChan(parameters[0]);
                                if (Ptr)
                                {
-                                       int n_list = 0;
                                        for (user_hash::const_iterator i = clientlist.begin(); i != clientlist.end(); i++)
                                        {
                                                if ((has_channel(i->second,Ptr)) && (isnick(i->second->nick)))
@@ -155,6 +149,7 @@ class ModuleOperWho : public Module
                                {
                                        WriteServ(user->fd,"401 %s %s :No such nick/channel",user->nick, parameters[0]);
                                }
+                               return 1;
                        }
                        else
                        {
@@ -173,6 +168,7 @@ class ModuleOperWho : public Module
                                        : "*", u->ident, u->dhost, u->server, u->nick, tmp, u->fullname);
                                }
                                WriteServ(user->fd,"315 %s %s :End of /WHO list.",user->nick, parameters[0]);
+                               return 1;
                        }
                }
                if (pcnt == 2)
@@ -197,6 +193,7 @@ class ModuleOperWho : public Module
                                return 1;
                        }
                }
+               return 0;
        }
        
        virtual ~ModuleOperWho()