Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- menu menubar {
- -
- - Auto-Ident MultiServeur -:/dialog -m ai ai
- }
- alias ai dialog -m ai ai
- dialog ai {
- title "Auto-Ident MultiServeur"
- size -1 -1 350 270
- edit "" ,2, 10 20 150 25, read
- list 1, 10 50 150 200, sort, extsel, multsel, size, vsbar
- radio "O&n" ,6, 210 170 35 15, left
- radio "O&ff" ,7, 250 170 100 15,
- button "&Ajouter" ,3, 200 30 120 24,
- button "&Supprimer" ,4, 200 80 120 24, disable
- button "&Modifier" ,5, 200 130 120 24, disable
- button "&Ok" ,8, 200 200 120 25, cancel
- }
- on *:dialog:ai:sclick:*: {
- if ($did == 1) { did -e $dname 4,5 }
- if ($did == $null) { did -b $dname 4,5 }
- if ($did == 3) { addai }
- if ($did == 4) { delai }
- if ($did == 5) { modifai }
- if ($did == 8) {
- if ($did(6).state == 1) { .enable #autoid }
- if ($did(7).state == 1) { .disable #autoid }
- }
- }
- alias -l addai {
- var %addaigars $$?="Entre le pseudo"
- var %addaipass $$?"Entre le pass"
- writeini $network $+ .autoident autoid %addaigars %addaipass | saveini
- did -a ai 1 %addaigars
- }
- alias -l delai {
- remini $network $+ .autoident autoid $did(1).seltext | saveini
- did -d ai 1 $did(1).sel
- }
- alias -l modifai {
- var %modifgars $$?="Par quel pseudo remplacer"
- var %modifpass $$?*"Par quel pass"
- remini $network $+ .autoident autoid $did(1).seltext | saveini
- did -d ai 1 $did(1).sel
- writeini $network $+ .autoident autoid %modifgars %modifpass | saveini
- did -a ai 1 %modifgars
- }
- on *:dialog:ai:init:0: {
- did -ra ai 2 $network
- if ($group(#autoid) == on) { did -c ai 6 }
- if ($group(#autoid) == off) { did -c ai 7 }
- var %a 1
- while (%a <= $ini($network $+ .autoident,autoid,0) ) {
- if ($ini($network $+ .autoident,autoid,%a) != $null) {
- did -a ai 1 $ini($network $+ .autoident,autoid,%a) }
- else { goto suite }
- :suite
- inc %a
- }
- }
- #autoid on
- on *:notice:*identify*motdepasse*:*: {
- if ($nick == nickserv) || ($nick == Themis) {
- if ($readini($network $+ .autoident,autoid,$me)) {
- echo 6 -a Identification de $me
- ns identify $readini($network $+ .autoident,autoid,$me)
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement