This error comes in partyline everytime i try to invite bot channel.
Tcl error [invitechan]: invalid channel prefix
Is this problem on script or in my bot?
command /invite botnick #chan
Thanks for help# Bot invite and kick script, makes the bot respond to invitations and stay away after being kicked.
# There is a build in check for +o status you might want to disable, look at the commented line in the code.
# By [NUT] (nut@fun-industries.nl) a.k.a. dFt^Nut http://www.dftclan.nl
### Config ###
###
# If you dont want invite to be opper only, change this value [1 = on, 0 is off]
###
set oponly "1"
###
# If you are not using an irc network that has a channel limit, set the number of max channels to 0,
# this will disable the maxchan value. Simply set this to your networks maxchan value otherwise.
# [Set to 20 as default (Quakenet)]
###
set chanlim "20"
### Change Log ###
# Version 1
# - Initial release
# Version 1.01
# - Fixed a small bug
# - Changed some configuration options
# Version 1.02
# - Fixed another small bug
# Version 1.03
# - discovered quick and dirty (untested) bug fixes are bad
# - discovered my nickname was disliked by TCL
# - fixed bugs
###
###
# Remember to quit and restart the bot and check for conflicting scripts!
# Not doing this will result in a nonfunctional script. After loading this script and discovering
# it doesnt work dcc into your bot and type .binds (be sure to have scroll back on!) and check the
# binds for command types kick and raw.
###
bind raw - INVITE invitechan
bind kick - * gotkicked
proc invitechan {mask word args} {
global chanlim oponly
set opts [split $mask "!"]
set nick [lindex $opts 0]
set opts [split $args "{:}"]
set chan [lindex $opts 2]
set uhand [nick2hand $nick]
if {$oponly} {
if {![matchattr $uhand "o"]} { return 0 }
}
if {$chanlim > 0} {
if {[llength [channels]] >= $chanlim} {
puthelp "NOTICE $nick :Sadly I cannot join any more channels."
return 0
}
}
channel add $chan {}
save
}
proc gotkicked {nick mask handle chan target reason} {
global botnick chanfile
if {[string match $botnick $target]} {
set isdynamic 0
set channelconf [open $chanfile r]
while {![eof $channelconf]} {
gets $channelconf regel
if {$regel == "" || [string match "#*" $regel]} { continue }
if {[string match -nocase "channel?add?$chan*" $regel]} { set isdynamic 1 } else { continue }
}
if {$isdynamic == "1"} {
channel remove $chan
save
}
}
}
putlog "invkick 1.03 Loaded. Made by NUT"