]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_check.cpp
AMD64 warning 'fix' which tested fine when I added it seems to now...stop things...
[user/henk/code/inspircd.git] / src / modules / m_check.cpp
index c6d8b08de006f8f5bb073105f47944894e8adfda..564bfa399614439f378465758b905fff9409ac70 100644 (file)
@@ -19,6 +19,9 @@ using namespace std;
 #include "users.h"
 #include "channels.h"
 #include "modules.h"
+#include "message.h"
+#include "commands.h"
+#include "inspircd.h"
 
 /* $ModDesc: Provides the /check command to retrieve information on a user, channel, or IP address */
 
@@ -37,6 +40,7 @@ class cmd_check : public command_t
                userrec *targuser;
                chanrec *targchan;
                std::string checkstr;
+               std::string chliststr;
 
                checkstr = "304 " + std::string(user->nick) + " :CHECK";
 
@@ -75,6 +79,11 @@ class cmd_check : public command_t
                                /* port information is only held for a local user! */
                                Srv->SendTo(NULL, user, checkstr + " onport " + ConvToStr(targuser->port));
                        }
+
+                       chliststr = chlist(targuser, targuser);
+                       std::stringstream dump(chliststr);
+                       /* XXX - This doent suck so much */
+                       Srv->DumpText(user,checkstr + " onchans ", dump);
                }
                else if (targchan)
                {
@@ -85,7 +94,7 @@ class cmd_check : public command_t
                        /*  /check on an IP address, or something that doesn't exist */
                }
 
-               Srv->SendTo(NULL, user, "304 " + std::string(user->nick) + " :CHECK END " + std::string(parameters[0]));
+               Srv->SendTo(NULL, user, checkstr + " END " + std::string(parameters[0]));
        }
 };