hi ppl
i need a tcl that ban all people that do
an ACTION in my bot private
for example
/query BOT
in my bot private
/ACTION come to *
tks
Code: Select all
# Ban the users also?
set ctcpkick_setting(ban) 0
# Set the kick message here.
set ctcpkick_setting(kickmsg) "Do not send me private actions."
# Set the ban type here:
# 1 - *!*@host.domain
# 2 - *!user@host.domain
# 3 - nick!*@host.domain
# 4 - nick!user@host.domain
# 5 - *!?user@*.host.domain
set ctcpkick_setting(bantype) "1"
bind ctcp - ACTION ctcp:actionkick
proc ctcpkick_maskban {nick uhost} {
global ctcpkick_setting
switch -- $ctcpkick_setting(bantype) {
1 { set ban "*!*@[lindex [split $uhost @] 1]" }
2 { set ban "*!$uhost" }
3 { set ban "$nick!*@[lindex [split $uhost @] 1]" }
4 { set ban "$nick!$uhost" }
5 { set ban "[maskhost $uhost]" }
default { set ban "*!*@[lindex [split $uhost @] 1]" }
}
return $ban
}
proc ctcp:actionkick {nick uhost hand dest keyword text} {
global ctcpkick_setting
if {![isbotnick $dest]} { return }
foreach chan [channels] {
if {![botonchan $chan] || ![onchan $nick $chan]} { continue }
if {$ctcpkick_setting(ban)} { putserv "MODE $chan +b [ctcpkick_maskban $nick $uhost]" }
putserv "KICK $chan $nick :$ctcpkick_setting(kickmsg)"
}
}