BOT !OP
Voila un bot quand on tape !op il op le gars mais il faut qu`il soit defini dans (op.txt) script en dialog si le pseudo ne figure pas dans le .txt alor il sera kicker et si il est op et que son pseudo nest pas dans le .txt il a juste a taper !op et sa l`ajoutera
alias onchan if ( $chan != $null ) { return ? & $chan $+ }
menu menubar,nicklist,channel {
-
-== !oplist ==-:/dialog -m oplist oplist
}
dialog oplist {
title ".:: Nick OpList ::."
size -1 -1 100 100
option dbu
list 1, 10 10 80 60, size
text " liste des nick dans votre base", 2, 10 1 80 8
button "Ajouter", 3, 30 80 40 12
}
dialog addnick {
title ".:: Ajouter un Nick ::."
size -1 -1 100 50
option dbu
edit "", 1, 20 15 60 10
button "Ajouter", 2, 30 30 40 12
text " Ajouter un nick ", 3, 20 4 60 8
}
on *:dialog:oplist:init:*: {
var %t 1
var %ligne = $lines(op.txt)
while (%t <= %ligne) {
did -a oplist 1 $read(op.txt,%t)
inc %t
}
}
on *:dialog:addnick:sclick:2: {
/write op.txt $did(1)
/dialog -x addnick addnick
/dialog -m oplist oplist
}
on *:dialog:oplist:sclick:3: {
/dialog -m addnick addnick
/dialog -x oplist oplist
}
on *:text:!op:#*: {
if ($nick isop $chan) { /msg $chan 11::2 $nick Tu est deja op pas besoin de t'op 40 fois ! 11:: }
elseif ($read(op.txt,w,[ [ $nick ] ])) { /mode $chan +o $nick }
else {
/msg $chan 11::2 $nick a essayer de s'op sans n'en etre permis il sera donc kicker 11::
/kick $chan $nick n'essaye pas de t'op sans ma permission...
}
elseif ($nick isop $chan && $nick !isin $read(op.txt)) {
/write op.txt $nick
/msg $chan 11::2 $nick Tu est deja op pas besoin de t'op 40 fois ! 11::
.notice $nick 11::2 Ton nouveau nick a etai ajouter a la base de donner tu poura taper !op avec se nick 11::
}
}