Code: Select all
set channel "#vhost"
set operid "flood"
set operpass "floodflood"
bind evnt - init-server oper
bind pub -|- !vhost vhost
bind join -|- * join
proc oper init-server { putserv "OPER $::operid $::operpass" }
proc join {nick host handle chan } {
if { $chan == $::channel } {
putserv "privmsg $chan para obtener tu host tipea !vhost <tu.host.que-quieras> NOTA: el vhost solicitado sera revisado para su aprobación"
}
}
proc vhost {vhostnick vhosthost vhosthand vhostchan vhosttext} {
if { $vhostchan == $::channel } {
checkvhost $vhostnick $vhosttext
}
}
set badwords { *<censored>* *maricon* *chupalo* *pico* *conchatumare* *admin* *adminetchat* *services* *ñ* *^* *+* *´<* *#* *ircop* *sex* *ircops* }
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 "privmsg #vhost $checknick Lo siento el vhost no puede ser \002$vhostcheck\002"
} else {
putserv "PRIVMSG hostserv set $checknick $vhostcheck"
putserv "MODE #vhost +b $checknick"
putserv "PRIVMSG #vhost tu vhost solicitado se ha aprobado con exito, tipea /hs on para activarlo"
putserv "PRIVMSG #vhost tu nuevo host es \002$vhostcheck\002"
putserv "kick #vhost $checknick"
}
} else {
putserv "privmsg $::channel $checknick faltan parametros"
}
}
Thank you