multiple ChatArrival
 

multiple ChatArrival

Started by deseven, 11 May, 2011, 12:00:51

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

deseven

Hello.

How can i block user message completely when using multiple ChatArrival in different scripts?

For example:

script #1
function ChatArrival(user,data)
  if `something` then
    return Core.SendToUser(user,"<bot> You can't write that."),true
  end
end


script #2
function ChatArrival(user,data)
  if `something else` then
    return Core.SendToAll("<"..user.sNick.."> blah-blah-blah"),true
  end
end


First script will block the message, but the second one will send the message anyway. How can i avoid that?

the-master

If the first script blocks the message, the second script wont have any chatarrival and wont be triggered to reply.
keep on sharing :)

deseven

Thank you for giving me a clue :)
That was just about the order of the scripts - first script must be on top of any others in the Scripts.xml

Closed.

SMF spam blocked by CleanTalk