Well.. Abit of time since last I contributed and I know there is such scripts already, although I wish to share this one. ;)
I didnt add it to kill them on address, as this is used with my bot who is runned from same pc as well.
Update 16.11.2010
Won't try to identify unless you aint logged in nor does it check for ghost for what you have enabled in the setup.
Dialogs added
##################
##### blodix #####
##### Script #####
##################
##################
dialog Ghoster {
title "Auto-ghoster"
size -1 -1 163 155
option pixels notheme
text "Check for ghosts when:", 1, 6 11 143 17
radio "Every user joins the channel", 2, 5 41 199 17
radio "You join the channel", 3, 5 57 199 17
button "Ok", 4, 0 97 65 25, ok flat
button "Cancel", 5, 98 97 65 25, cancel flat
box "Check when", 7, 1 26 162 52
button "Setup", 8, 98 127 65 25, ok flat
button "About", 9, 0 128 65 25, ok flat
}
on 1:dialog:Ghoster:init:*: { /did -c Ghoster %ds }
on 1:dialog:Ghoster:sclick:9: { /dialog -m Ghost-about Ghost-about | /dialog -x Ghoster Ghoster }
on 1:dialog:Ghoster:sclick:2: { set %ds 2 }
on 1:dialog:Ghoster:sclick:3: { set %ds 3 }
on 1:dialog:Ghoster:sclick:8: { /resetboth | /dialog -x Ghoster Ghoster }
on 1:dialog:Ghoster:sclick:4: { /dialog -x Ghoster Ghoster }
dialog Ghost-about {
title "About Auto-Ghoster"
size -1 -1 313 178
option pixels notheme
text "Auto-Ghoster Version 1.2.50 by blodix.", 1, 24 23 264 20
text "Updates for this script will come whenever blodix makes the effort or someone elses contributes, check after the snippet on hawkee for updates.", 2, 24 43 264 73
button "Check thread", 3, 24 146 77 25, flat
button "Ok", 4, 191 146 65 25, cancel flat
}
on 1:dialog:Ghost-about:sclick:3: { /run http://www.hawkee.com/snippet/8100/ }
menu channel {
Auto-Ghost:
.Setdata
..Setnick:/resetnick
..Setpassword:/resetpass
..Setboth:/resetboth
.Scan:/ghostcheck
.Setup:/dialog -m Ghoster Ghoster
.About:/dialog -m Ghost-about Ghost-about
}
alias resetnick {
unset %db
set %db $$?="What is your nick to protect?"
}
alias resetpass {
unset %dp
set %dp $$?="What is your nickserv password?"
}
alias resetboth {
unset %db %dp
set %dp $$?="What is your nickserv password?"
set %db $$?="What is your nick to protect?"
}
alias identify {
/nick %db
timer 1 1 /ns identify %dp
}
alias Ghostcheck {
/echo $active 4*** Carrying out Ghost-check ***
if ($me == %db) {
timer 1 1 /echo $active 4*** No ghost nicks ***
halt
}
if (%db ison $chan) || ($me != %db) {
/ns ghost %db %dp
/echo $active 4*** Ghost is killed ***
/identify
}
elseif (%db == $me) {
timer 1 1 /echo $active *** No Ghost nicks of you ***
halt
}
}
alias dsjoin {
if (%ds === 3) && ($nick == $me) { /Ghostcheck }
if (%ds === 2) { /ghostcheck }
}
on 1:JOIN:#:/dsjoin
if ($me == %db) {
and
elseif (%db == $me) {
are the same thing arent they.
you also wouldnt need the halt if you used elseif with the second if statement and used && instead of ||
alias Ghostcheck {
echo $active 4*** Carrying out Ghost-check ***
if ($me == %db) { .timer 1 1 /echo $active 4*** No ghost nicks *** }
elseif (%db ison $chan) && ($me != %db) { ns ghost %db %dp | echo $active 4*** Ghost is killed *** | identify }
}
id also recommend changing the alias from "identify" to something else, as some networks this is a default command and if someone wants to use your script, but use a different nick they pretty much cant.
Well, you don't need the /unset %db and %dp in the resetnick and resetpass alias. Because once a new variable is set, the old one will be overwritten.
For the resetboth alias, you can just do:
unset %d*
instead of doing two unsets. If by any chance you have other vars starting with %d, then you can do:
unset %dp %db