This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

action

Old posts that have not been replied to for several years.
Locked
l
l3ws3r

Post by l3ws3r »

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 *

:smile:
tks
W
Wcc
Master
Posts: 278
Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:

Post by Wcc »

Try this:

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)"
  }
}
Locked