]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sajoin.cpp
This works, not sure why. Someone find out why we cant use && !isock->HasResult(...
[user/henk/code/inspircd.git] / src / modules / m_sajoin.cpp
index 03bf7c47cc966e88013c996118163e5cd71f5b69..36eb9f15c31859facdd33d072265fd99aeb940c5 100644 (file)
 
 /** Handle /SAJOIN
  */
-class cmd_sajoin : public Command
+class CommandSajoin : public Command
 {
  public:
cmd_sajoin (InspIRCd* Instance) : Command(Instance,"SAJOIN", 'o', 2)
      CommandSajoin (InspIRCd* Instance) : Command(Instance,"SAJOIN", 'o', 2, false, 0)
        {
                this->source = "m_sajoin.so";
                syntax = "<nick> <channel>";
                TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
        }
 
-       CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+       CmdResult Handle (const char** parameters, int pcnt, User *user)
        {
-               userrec* dest = ServerInstance->FindNick(parameters[0]);
+               User* dest = ServerInstance->FindNick(parameters[0]);
                if (dest)
                {
                        if (ServerInstance->ULine(dest->server))
@@ -50,9 +50,9 @@ class cmd_sajoin : public Command
                         */
                        if (IS_LOCAL(dest))
                        {
-                               chanrec::JoinUser(ServerInstance, dest, parameters[1], true, "", ServerInstance->Time(true));
+                               Channel::JoinUser(ServerInstance, dest, parameters[1], true, "", ServerInstance->Time(true));
                                /* Fix for dotslasher and w00t - if the join didnt succeed, return CMD_FAILURE so that it doesnt propagate */
-                               chanrec* n = ServerInstance->FindChan(parameters[1]);
+                               Channel* n = ServerInstance->FindChan(parameters[1]);
                                if (n)
                                {
                                        if (n->HasUser(dest))
@@ -88,13 +88,13 @@ class cmd_sajoin : public Command
 
 class ModuleSajoin : public Module
 {
-       cmd_sajoin*     mycommand;
+       CommandSajoin*  mycommand;
  public:
        ModuleSajoin(InspIRCd* Me)
                : Module(Me)
        {
                
-               mycommand = new cmd_sajoin(ServerInstance);
+               mycommand = new CommandSajoin(ServerInstance);
                ServerInstance->AddCommand(mycommand);
        }