Author Topic: Private messaging broked  (Read 526 times)

Quote
package functions
{
   function serverCmdMessageSent(%client,%msg)
   {
      if(getword(%msg,0) $= "pm")
      {
         %target = getword(%msg,1);
         %newtarget = findclientbyname(%target);
         if(%newtarget $= 0)
         {
              messageClient(%client,'',"False client");
         }
         else
         {
            %msg = getwords(%msg,2);
            %msg = strreplace(%msg,"[n]","\n");
            messageClient(%newtarget,'',"[PM]" @ %client.name @ ":" SPC %msg);
         }
      }
      else
      {
         Parent::serverCmdMessagesent(%client,%msg);
      }
   }
};
activatepackage(functions);

I've kinda butchered blings code, I know. But I don't understand why it won't work for me, and I don't want to go back to having %m1,%m2,%m3, etc in the parameters of the function and messageclient.

All working fine now.
« Last Edit: June 30, 2009, 05:59:40 AM by Beekay »


No. Someone might encounter a similar problem, or have something further to ask about the code.

Badspot should disable locking in Coding Help.