All pastes #619258 Raw Edit

Mine

public text v1 · immutable
·published 2007-07-14 16:07 UTC
rendered paste body
bind pub - !assign cmd:assign
bind join - * join:isop
bind NOTC -|- "Le channel*n'est pas*" NoReg

proc cmd:assign {nick uhost hand channel arg} {
  global botnick botchan salon ndb bnick
  if {$channel == $botchan} {
    set salon [lindex $arg 0]
    set ndb [lrange $arg 1 end]
    set bnick $nick
    channel add $salon
  }
}

proc join:isop { nick uhost hand channel } {
  global botnick salon ndb bnick
  putserv "privmsg $salon :14Tu as demander l'assignation d'un bot sur ce salon3 $bnick14."
  if {[isop $bnick $salon]} {
    putserv "privmsg BotServ :assign $ndb $salon"
    channel remove $salon
  } else {
    putserv "privmsg $bnick :14Tu dois être opérateur (4@14) du salon pour y mettre un bot !"
  }
}

proc NoReg {nick uhost handle dest arg} { 
  global bnick
  putserv "notice $bnick :14Ton salon doit être enregistré pour y mettre un bot ! Si tu sais pas comment faire, demandes sur 3#Aide14."
}