Code: Select all
bind pub - "#" pub:adv
proc pub:adv {nick uhost hand chan arg} {
global logo botnick
if {[nickisreg $chan]} && {[string match $chan #hooters]} {
set ad. [ [ $nick ] ]
if {ad. [ [ $nick ] ] == 1 } {
pustserv "NOTICE $nick :Please don't advertise
}
if {ad. [ [ $nick ] ] == 2 } {
putserv "MODE $chan +b *!*@[join [lindex [split [getchanhost $nick] "@"] 1]]"
putkick $chan $nick "Don't advertise in here."
utimer 600 [list putserv "MODE $chan -b *!*@[join [lindex [split [getchanhost $nick] "@"] 1]]"]
}
if {ad. [ [ $nick ] ] == 3 } {
putserv "MODE $chan +b *!*@[join [lindex [split [getchanhost $nick] "@"] 1]]"
putkick $chan $nick "Don't advertise in here."
utimer 1800 [list putserv "MODE $chan -b *!*@[join [lindex [split [getchanhost $nick] "@"] 1]]"]
}
unset ad . [ [ $nick ] ]
}