All pastes #348036 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-02-09 21:32 UTC
rendered paste body
dialog inv {
  title "Invite Control"
  size -1 -1 85 50
  option dbu
  text "Chan:", 6, 4 13 14 8
  edit "", 3, 25 11 55 10, read
  text "From:", 5, 4 24 14 8
  edit "", 7, 25 22 55 10, read
  button "I accept", 1, 5 34 37 12, flat
  button "I Decline", 2, 44 34 37 12, flat
  box "Invite Control", 4, 1 1 84 49
}
on *:dialog:inv:sclick:1:{
  /notice %qnick $ewrap(Invite Accepted)
  /join %invitechan
  /dialog -x inv
  /unset %qnick
}
on *:dialog:inv:sclick:2:{
  /notice %qnick $ewrap(Invite declined)
  /dialog -x inv
  /unset %qnick
}
on *:invite:#: {
  /set %invitechan $chan  
  /set %qnick $nick
  /notice %qnick $ewrap(Please Wait For Invite Acceptance/Decline)
  /dialog -m inv inv
  did -a inv 3 $chan
  did -a inv 7 %qnick

}

alias ewrap {
  var %msg
  var %tok = 1
  var %word
  while ($gettok($1-,%tok,32) != $null) {
    %word = $gettok($1-,%tok,32)
    %msg = %msg 15 $+ $upper($left(%word,1)) $+ 15 $+ $right(%word,-1) 
    inc %tok
  }
  return 12,1(15 $+ %msg $+ 12)
}