Hello can anyone help me,and tell me how it's possible to do
/msg $botnick +ban #channel *@host.domain reason here
and the same with -ban command.
Edited Thanks .
Code: Select all
unbind msg o|o +ban *msg:+ban;
bind msg o|o +ban msg:+ban;
proc msg:+ban {handle idx arg} {
if {$arg == ""} {
*msg:+ban $handle $idx $arg
return 0
}
set date [strftime %d/%m/%y]
set defr "Banned without reason"
set host [lindex [split $arg] 0]
if {[string first # [set c [lindex [split $arg] 1]]] == 0} {
if {[string first % [set t [lindex [split $arg] 2]]] == 0} {
if {[set r [join [lrange [split $arg] 3 end]]] == ""} {
set r $defr
}
*msg:+ban $handle $idx "$host $c $t $handle:\002 $r"
}
} {
if {[string first % [set t [lindex [split $arg] 1]]] == 0} {
if {[set r [join [lrange [split $arg] 2 end]]] == ""} {
set r $defr
}
*msg:+ban $handle $idx "$host $t $handle:\002 $r"
} {
if {[set r [join [lrange [split $arg] 1 end]]] == ""} {
set r $defr
}
*msg:+ban $handle $idx "$host $handle:\002 $r"
}
}
}