All pastes #331649 Raw Edit

Helpserv

public text v1 · immutable
#331649 ·published 2007-01-29 02:22 UTC
rendered paste body
on *:START:{
  hmake hlist
}

on *:JOIN:#CHANNEL:{
  if ($nick != $me) {
    msg $nick Hello, welcome to $chan $+ , please /msg $me <with a description of your problem here> for faster service.
    hadd hlist $nick
  }
}

on *:TEXT:!next:?:{
  if ($nick isop #CHANNEL) {
    if ($hfind(hlist,*,0,w) > 0) {
      set %h.user $hfind(hlist,*,1,w)
      mode #CHANNEL +v %h.user
      if ($hget(hlist,1).data != $null) {
        msg $nick [^B]You have been assigned[^B] %h.user $+ [^B]. The user has specified the following problem:[^B] $hget(hlist,1).data
      }
      else {
        msg $nick [^B]You have been assigned[^B] %h.user $+ [^B]. The user has not specificed a problem.
      }
      msg %h.user Thank you for waiting. Your assigned helper will be $nick
      hdel hlist %h.user
      unset %h.user
    }
  }
}
on *:TEXT:*:?:{
  if ($hfind(hlist,$nick,1)) {
    hadd hlist $nick $1-
  }
}
on *:OP:#CHANNEL:{
  if ($hfind(hlist,$opnick,1)) {
    hdel hlist $opnick
  }
}
on *:PART:#CHANNEL:{
  if ($hfind(hlist,$nick,1)) {
    hdel hlist %h.part
  }
}