]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/cmd_userhost.cpp
Fixed an issue that could cause empty parameters in module commands to not be sent...
[user/henk/code/inspircd.git] / src / cmd_userhost.cpp
index 363ba611cf833cea6017dc111f2280ac41702bc6..8a0e187fb0a4503b7fdd13e32bc5add9ee924e8d 100644 (file)
  * ---------------------------------------------------
  */
 
-#include "users.h"
 #include "inspircd.h"
 #include "commands/cmd_userhost.h"
 
-
-
-extern "C" command_t* init_command(InspIRCd* Instance)
+extern "C" DllExport command_t* init_command(InspIRCd* Instance)
 {
        return new cmd_userhost(Instance);
 }
@@ -33,9 +30,9 @@ CmdResult cmd_userhost::Handle (const char** parameters, int pcnt, userrec *user
 
                if ((u) && (u->registered == REG_ALL))
                {
-                       retbuf = retbuf + " ";
+                       retbuf = retbuf + u->nick;
 
-                       if (*u->oper)
+                       if (IS_OPER(u))
                        {
                                retbuf = retbuf + "*=+";
                        }
@@ -46,7 +43,7 @@ CmdResult cmd_userhost::Handle (const char** parameters, int pcnt, userrec *user
 
                        retbuf = retbuf + u->ident + "@";
 
-                       if (*user->oper)
+                       if (IS_OPER(user))
                        {
                                retbuf = retbuf + u->host;
                        }
@@ -54,6 +51,8 @@ CmdResult cmd_userhost::Handle (const char** parameters, int pcnt, userrec *user
                        {
                                retbuf = retbuf + u->dhost;
                        }
+
+                       retbuf = retbuf + " ";
                }
        }