* ---------------------------------------------------
*/
-#include <string>
-#include "inspircd_config.h"
#include "inspircd.h"
#include "configreader.h"
#include "users.h"
#include "modules.h"
#include "wildcard.h"
-#include "commands.h"
-#include "helperfuncs.h"
#include "commands/cmd_privmsg.h"
+
+
+extern "C" command_t* init_command(InspIRCd* Instance)
+{
+ return new cmd_privmsg(Instance);
+}
+
void cmd_privmsg::Handle (const char** parameters, int pcnt, userrec *user)
{
userrec *dest;
}
parameters[1] = (char*)temp.c_str();
- if (dest->fd > -1)
+ if (IS_LOCAL(dest))
{
// direct write, same server
user->WriteTo(dest, "PRIVMSG %s :%s", dest->nick, parameters[1]);