Hi,
i looking for a Ban script how Allows any user from chan #yy to kickbans user in chan #xx
The users in the Internal Chanel have only +v.
There somebody can help me?
Code: Select all
# Author: tomekk
# e-mail: tomekk/@/oswiecim/./eu/./org
# home page: http://tomekk.oswiecim.eu.org/
#
# Version 0.1
#
# This file is Copyrighted under the GNU Public License.
# http://www.gnu.org/copyleft/gpl.html
# channel with users
set command_channel "#xx"
# channel with !kbu command
set users_channel "#yy"
# host mask type
# 1) *!*@*.domain.com
# 2) *!*@some.domain.com
# 3) *nick*!*@some.domain.com
# 4) *!*ident*@some.domain.com
set host_mask 1
#########################################################
bind pub -|- !kbu kbu_proc
proc kbu_proc { nick uhost hand chan arg } {
global command_channel users_channel
if {$chan == $command_channel} {
set user_nick [lindex [split $arg] 0]
if {$user_nick != ""} {
if {![isbotnick $user_nick]} {
if {[botonchan $users_channel]} {
if {[onchan $user_nick $users_channel]} {
putquick "MODE $users_channel +b [banmask [getchanhost $user_nick $users_channel] $user_nick]"
putkick $users_channel $user_nick
}
}
}
}
}
}
proc banmask { host nick } {
global host_mask
switch -- $host_mask {
1 {
set mask "*!*@[lindex [split [maskhost $host] "@"] 1]"
}
2 {
set mask "*!*@[lindex [split $host @] 1]"
}
3 {
set mask "*$nick*!*@[lindex [split $host "@"] 1]"
}
4 {
set mask "*!*[lindex [split $host "@"] 0]*@[lindex [split $host "@"] 1]"
}
}
return $mask
}
putlog "kickhim.tcl ver 0.1 by tomekk loaded"
Code: Select all
[ 17:12:00 ] 11[08 BOT 11]12 [17:12] Tcl error [pub:kb]: bad index "o": must be integer?[+-]integer? or end?[+-]integer?
[ 17:12:07 ] 11[08 BOT 11]12 [17:12] Tcl error [pub:kb]: bad index "o": must be integer?[+-]integer? or end?[+-]integer?