]> 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 f1a160b98fe1bf04f230a998f523947304eb1ae2..564bfa399614439f378465758b905fff9409ac70 100644 (file)
@@ -21,6 +21,7 @@ using namespace std;
 #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 */
 
@@ -80,34 +81,9 @@ class cmd_check : public command_t
                        }
 
                        chliststr = chlist(targuser, targuser);
-                       if (chliststr.length())
-                       {
-                               if (chliststr.length() > 400)
-                               {
-                                       /* XXX - this sucks. deal with it. */
-                                       std::stringstream chstream(chliststr);
-                                       std::string line = "";
-                                       std::string cname = "";
-                                       while (!chstream.eof())
-                                       {
-                                               chstream >> cname;
-                                               line = line + cname + " ";
-                                               if (line.length() > 400)
-                                               {
-                                                       Srv->SendTo(NULL, user, checkstr + " onchans " + line);
-                                                       line = "";
-                                               }
-                                       }
-                                       if (line.length())
-                                       {
-                                               Srv->SendTo(NULL, user, checkstr + " onchans " + line);
-                                       }
-                               }
-                               else
-                               {
-                                       Srv->SendTo(NULL, user, checkstr + " onchans " + chliststr);
-                               }                               
-                       }
+                       std::stringstream dump(chliststr);
+                       /* XXX - This doent suck so much */
+                       Srv->DumpText(user,checkstr + " onchans ", dump);
                }
                else if (targchan)
                {