UtoNet Script for mIRCBy: cerberus
Last Modified: Oct 25 6:16pm (r3)

just a lil addon i wrote when i was bored long time ago
write /un to start it up
gl hf
write /un to start it up
gl hf

dialog UtoNet.table {
title "UtoNet [/un]"
size -1 -1 190 170
option pixels
box "NickServ Password", 1, 0 0 190 40
box "Auto Join", 2, 0 40 190 40
edit "", 3, 5 15 180 21, pass center
edit "", 4, 5 55 180 21, autohs
button "&Close", 5, 130 145 55 20, ok
check "Channel &Protections", 6, 5 95 140 20
check "&Join on CS Invite", 7, 5 115 140 20
box "General Settings", 8, 0 80 190 60
text "Author: CerberuS", 9, 10 147 100 16
}
on *:dialog:UtoNet:init:0: {
did -a UtoNet 3 $decode($hget(UtoNet,identify))
did -a UtoNet 4 $hget(UtoNet,ajoin)
if ($hget(UtoNet,protections) == true) did -c UtoNet 6
if ($hget(UtoNet,csinvite) == true) did -c UtoNet 7
}
on 1:dialog:UtoNet:sclick:5: {
hadd -m UtoNet identify $encode($did(UtoNet,3).text)
hadd -m UtoNet ajoin $did(UtoNet,4).text
if ($did(UtoNet,6).state == 1 ) hadd -m UtoNet protections true
else hadd -m UtoNet protections false
if ($did(UtoNet,7).state == 1 ) hadd -m UtoNet csinvite true
else hadd -m UtoNet csinvite false
}
menu status,channel,query {
Utonet
.Identify: un.identify
.Join Channels: un.ajoin
.-
.Configure: un
}
alias un dialog -m UtoNet UtoNet.table
alias -l un.identify ns identify $decode($hget(UtoNet,identify))
alias -l un.ajoin {
var %c = 1
while (%c <= $numtok($hget(UtoNet,ajoin),44)) {
var %q = $gettok($hget(UtoNet,ajoin),%c,44)
if ($me !ison %q) {
cs invite %q
join %q
}
inc %c
}
}
on *:rawmode:#: {
if (($network == UtoNet) && ($hget(UtoNet,protections) == true)) {
if ($+(*-*a*,$me,*) iswm $1-) { un.identify }
else if ($+(*-*o*,$me,*) iswm $1-) { un.identify }
else if ($+(*-*h*,$me,*) iswm $1-) { un.identify }
if (*+*b* iswm $1) {
var %c = 1
while (%c <= $numtok($2-,32)) {
var %q = $gettok($2-,%c,32)
if (%q iswm ~r: $+ $fullname) { mode $chan -b %q }
if (~c:* iswm %q) && ($me ison $gettok(%q,2,58)) { mode $chan -b %q }
if (%q iswm $address($me,5)) { mode $chan -b+e %q %q }
inc %c
}
}
}
}
on *:notice:*Password accepted -- you are now recognized.*:*: if (($network == UtoNet) && ($nick == NickServ) && ($hget(UtoNet,identify) != $null)) un.ajoin
on *:notice:*This nickname is registered and protected.*:*: if (($network == UtoNet) && ($nick == NickServ) && ($hget(UtoNet,identify) != $null)) un.identify
on *:invite:*: if (($network == UtoNet) && ($nick == ChanServ) && ($hget(UtoNet,csinvite) == true)) join $chan
on *:start: {
if ($hget(UtoNet) == $null) hmake UtoNet
hload -i UtoNet UtoNet.dat
}
on *:exit: hsave -i UtoNet UtoNet.dat
|

Comments