Advertisement
Guest User

Untitled

a guest
Jul 9th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. property rateTrigger : "!RATE"
  2.  
  3. using terms from application "Colloquy"
  4.    
  5.     on process incoming chat message theMessage from theUser in theView
  6.         set theText to HTML of theMessage as string
  7.         set n to random number from 1 to 10 as string
  8.         set u to theUser's name as string
  9.         if (get word 1 of theText) is rateTrigger then
  10.             tell theView
  11.                 send message "" & u & ", I rate that " & n & " out of 10."
  12.             end tell
  13.         end if
  14.     end process incoming chat message
  15. end using terms from
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement