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.

[09:52] Tcl error [NoticeBan]: illegal channel: @#channel

Old posts that have not been replied to for several years.
Locked
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

[09:52] Tcl error [NoticeBan]: illegal channel: @#channel

Post by Sir_Fz »

Code: Select all

bind NOTC - * NoticeBan
proc NoticeBan {nick uhost handle text dest} {
global botnick
if {[isop $nick $dest]} {return 0}
if {![botisop $dest]} { return 0 }
if {[isvoice $nick $dest]} {return 0}
if {([isbotnick $nick]) || ([string match $nick "ChanServ"])} {return 0}                                     
set banmask "*!*@[lindex [split $uhost @] 1]"
putserv "KICK $dest $nick :Notice Not Allowed - Consider yourself Banned."
putquick "MODE $dest +b $banmask"
return 1
}
what should be fixed so the error [NoticeBan]: illegal channel: @#channel wouldn't appear.
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

first of... $dest is not always a channel... it can also be the bot itself
as for the error, it doesn't looks like it supports @ infront of channelnames, make sure you have the correct network-type set in the configfile, if it still gives errors just strip the @ of the channel before processing it further
Elen sila lúmenn' omentielvo
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

well the network settings are all correct.
actually the error isn't so harmfull.
but sometime the errors appears like invalid channel Bot (supposing that "bot" is the bot's nick)
or invalid channel @#channel ...etc

so is there a way to make that not appear ?
User avatar
caesar
Mint Rubber
Posts: 3776
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Use this:

Code: Select all

if {[lindex [split $dest "@"] 0] == $::botnick || [string index $dest 0]== "@"} { return }
to return when is an onotice or notice sent to the bot.
Once the game is over, the king and the pawn go back in the same box.
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

well notices to the bot return.
but onotices:
[16:06] Tcl error [NoticeBan]: illegal channel: @#channel

thanx :)
User avatar
caesar
Mint Rubber
Posts: 3776
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Then use:

Code: Select all

set dest [string trim $dest @]
Once the game is over, the king and the pawn go back in the same box.
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

thanx, now no illegal channel @#channel. but the illegal channel botnick is back.

note: I removed the first code u gave me.
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

also when there is a server notice the bot bans *!*@*
like for example:
 · · [ kernel.ga.us.dal.net (@#channel) ] ChanServ invited User into channel #channel.
. . ChanMode: Botnick sets mode [ +b ] *!*@*
. . ChanMode: Botnick sets mode [ -bo ] *!*@* Botnick
I tried to add if {([string match $nick "*.dal.net"])} { return 0 }
but it didn't work.
User avatar
caesar
Mint Rubber
Posts: 3776
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Well the set dest thing should be placed right before the place you get the host and place the ban (set banmask "*!*@[lindex [split $uhost @] 1]"). As for the *host check* use this:

Code: Select all

if {[string match "*.dal.net" $uhost]} { return 0 }
Once the game is over, the king and the pawn go back in the same box.
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

thanx :) I understood that.
but I have found another script in the tcl archibe :)
Locked