Vhosts -Eggdrop
Platform: TCL
Published Apr 15, 2005
Updated Sep 04, 2008
This is useful on unrealircd networks with anope services. The bot needs an oline that would give it access to chghost, and access to set hosts in hostserv. There is one line that needs to be changed when you add words to the badwords list, it is commented as such. Sorry for any problems you may have with this (it works for what it is.) Also, this code will send a globops message when it changes a host, so that abuse can be monitored. Just change the variables at the top.
set channel "#vhost"
set operid "operlogin"
set operpass "youroperpass"
bind evnt - init-server oper
bind pub -|- !vhost vhost
bind join -|- * joinnotice
proc oper init-server { putserv "OPER $::operid $::operpass" }
proc joinnotice {noticenick noticehost noticehandle noticechan } {
if { $noticechan == $::channel } {
putserv "NOTICE $noticenick To change your host type !vhost <thehost.you.want> and you'll recieve a msg "
}
}
proc vhost {vhostnick vhosthost vhosthand vhostchan vhosttext} {
if { $vhostchan == $::channel } {
checkvhost $vhostnick $vhosttext
}
}
set badwords { *<censored>* *g0v* *admin* *fark* *fag* *!@#$* *suck* *shoot* *asshole* *zub* *bitch* *cock* *@#$* *whore* *slut* *fartknocker* *ass* *bastard* *black* *pussy* *dickhead* *nigga* *piss* *maricon* *shoot* *prick* *sucks* *dicks* *pricks* *.htm* *www.* *#* *channel* *sex* *ass* *trick* *fuk* *azz* *hail* *hitler* *gov* *mil* *cyberarmy* *cia* *fbi* *nsa* *dod* }
proc checkvhost { checknick vhostcheck } {
if {[string match "*.*.*" [string tolower $vhostcheck]]} {
set temp 0
set results 0
#$temp<=X X = number of space delimited tokens in the badwords variable.
while {$temp<=47} {
foreach x [string tolower $::badwords] {
if {[string match $x [string tolower $vhostcheck]]} {
incr results
}
}
incr temp
}
unset temp
if { $results > 0 } {
putserv "NOTICE $checknick Your Vhost has not been changed to $vhostcheck as it is an invalid/disallowed host."
} else {
putserv "GLOBOPS $checknick has changed their vhost to '$vhostcheck'"
putserv "chghost $checknick $vhostcheck"
putserv "NOTICE $checknick Your vhost has been changed to '$vhostcheck'"
putserv "PRIVMSG hostserv set $checknick $vhostcheck"
putserv "NOTICE $checknick To make the server set your vhost whenver you connect type '/msg hostserv on now'"
}
} else {
putserv "NOTICE $checknick You muse use two '.'s in your vhost"
}
}