All pastes #953448 Raw Edit

Stuff

public text v1 · immutable
#953448 ·published 2008-03-23 02:12 UTC
rendered paste body
bind pub  - point  point:pub

proc point:pub {nick uhost hand chan args} {

set option      [lindex $args 0]   ;#option
set target      [lindex $args 1]
set info "NOT SET"

        switch  -- $option {

          info {
  putlog a
 if {[string equal [getuser $target XTRA point] ""]}  {
 set info "User $target does not seem to be playing the game."
        }
 if {![string equal [getuser $target XTRA point] ""]}  {
        set info "User $target has \002[getuser $target XTRA point]\002 point(s)"
        }
        puthelp "PRIVMSG $chan :$info"
 return mama
 }

 add {
    if {![validuser $target]} {set info "User $target does not exist."} else {
        set i [getuser $target XTRA point]
        incr i
        setuser $target XTRA point $i
        set info "User $target now has \002[getuser $target XTRA point]\002 point(s)"
        }
        puthelp "PRIVMSG $chan :$info"
        }



 sub {
  if {![validuser $target]} {set info "User $target does not exist."} else {
        set i [getuser $target XTRA point]
        set b [expr $i - 1]; setuser $target XTRA point $b
        set info "User $target now has \002[getuser $target XTRA point]\002 point(s)"
        }
        puthelp "PRIVMSG $chan :$info"
}
default {puthelp "privmsg $chan :Usage: !search <-add|-remove|-verify> \$chan"}

}
puthelp "PRIVMSG $chan :$info"
}