message system

By Aaron on Feb 21, 2007

!msg nick(use _) msg to be sent
!yes
!no

*yeah it is pretty pointless but hey you never know :)

on *:text:!msg*:*:{ 
  if (%xmsg. [ $+ [ $2 ] ] == $null) {
    set -u60 %xmsg. [ $+ [ $2 ] ] $3-
    set -u60 %xnick. [ $+ [ $2 ] ] $2
    set -u60 %acceptpm. [ $+ [ $2 ] ] on
    set -u60 %senick. [ $+ [ $2 ] ] $nick
    .msg $2 10msg from4 $nick $+ 10, type 4!yes10 or 4!no10.
    .notice $nick 10msg to4 $2 10has been sent. Please wait for4 $2 10 to accept or decline 
  }
  else notice $nick 10Someone has already sent a message to:4 %xnick. [ $+ [ $2 ] ] $+ 10. Please wait
}
on *:text:!yes:?:{
  if (%acceptpm. [ $+ [ $nick ] ] == on) {
    .msg $nick 10Msg from4 %senick. [ $+ [ $nick ] ] $+ 10...
    .msg $nick 4[10MSG4]10:4 %xmsg. [ $+ [ $nick ] ]
    unset %acceptpm. [ $+ [ $nick ] ]
    notice %senick. [ $+ [ $nick ] ] 4 %xnick. [ $+ [ $nick ] ] 10has accepted your message.
  }
  else .msg $nick you dont have a message waiting for you
}
on *:text:!no:?:{
  if (%acceptpm. [ $+ [ $nick ] ] == on) {
    .msg $nick 10The message4 %senick. [ $+ [ $nick ] ] 10has been succesfully declined.
    .notice %senick. [ $+ [ $nick ] ] 4 %xnick. [ $+ [ $nick ] ] 10has declined your message.
  }
  else .msg $nick you dont have a message waiting for you
}

Comments

Sign in to comment.
Lindrian   -  Feb 21, 2007

And i think ur able to do it all in 1 text event acually, except the !Yes/no part.

 Respond  
Lindrian   -  Feb 21, 2007

Maybe a little script with raw 303?

 Respond  
Aaron   -  Feb 21, 2007

sorry i took it out before, and if you know how to check please tell me :P

 Respond  
Lindrian   -  Feb 21, 2007

Theres no else statement at the !no thingy, and what if the user is offline and such?

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.