bind mode - "% +b" vw:addban
proc vw:addban {nick uh hand chan mc arg} {
if {[string index [set t [lindex [split $arg @] 1]] 0 2] == "vw"} {
if {[string index $t 2] == "-"} {
set b "*!*@vw[string range $t 2 end]"
} else {
set b "*!*@vw-[string range $t 3 end]"
}
putserv "MODE $chan +b $b"
}
}
Code: Select all
bind mode - "% -b" vw:remban
proc vw:remban {nick uh hand chan mc arg} {
if {[string index [set t [lindex [split $arg @] 1]] 0 2] == "vw"} {
if {[string index $t 2] == "-"} {
set b "*!*@vw[string range $t 2 end]"
} else {
set b "*!*@vw-[string range $t 3 end]"
}
putserv "MODE $chan -b $b"
}
}
Ive loaded the script, restarted my bot, but it doesnt seem to work.bind mode - "% +b" vw:addban
proc vw:addban {nick uh hand chan mc arg} {
if {[string range [set t [lindex [split $arg @] 1]] 0 2] == "vw"} {
if {[string range $t 2] == "-"} {
set b "*!*@vw[string range $t 2 end]"
} else {
set b "*!*@vw-[string range $t 3 end]"
}
putserv "MODE $chan +b $b"
}
}
I dont even get the notice to the channel "Ive detected a ban" so its not going into that part of the if statement.proc vw:addban {nick uh hand chan mc arg} {
if {[string range [set t [lindex [split $arg @] 1]] 0 2] == "vw"} {
putserv "NOTICE $chan Ive detected a ban"
if {[string index $t 2] == "-"} {
set b "*!*@vw[string range $t 2 end]"
} else {
set b "*!*@vw-[string range $t 3 end]"
}
putserv "MODE $chan +b $b"
}
}