]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/cmd_privmsg.cpp
YAY! A module which allows a user to oper via their ssl key fingerprint.
[user/henk/code/inspircd.git] / src / cmd_privmsg.cpp
index 557289bbd43e5a69fa56168067217aba55495c8d..e387b6ae345482adf0a77b069ff1ab36507dca36 100644 (file)
  * ---------------------------------------------------
  */
 
-#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;
@@ -120,7 +123,7 @@ void cmd_privmsg::Handle (const char** parameters, int pcnt, userrec *user)
                }
                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]);