#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 */
userrec *targuser;
chanrec *targchan;
std::string checkstr;
+ std::string chliststr;
checkstr = "304 " + std::string(user->nick) + " :CHECK";
/* 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)
{
/* /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]));
}
};