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.

error ?

Help for those learning Tcl or writing their own scripts.
Post Reply
p
pektek
Halfop
Posts: 49
Joined: Sat Jul 01, 2023 4:51 pm

error ?

Post by pektek »

error message

Tcl error [join:chan]: illegal channel: #sohbet

Code: Select all

set joinchan   "#kelime"
set chantojoin "#Sohbet"

bind join -|- * join:chan

proc join:chan {nick host hand chan} {
 global joinchan chantojoin
 if {[string equal -nocase $joinchan $chan] && ![onchan $nick $chantojoin]} {
  putquick "SAJOIN $nick $chantojoin"
 }
}
User avatar
CrazyCat
Revered One
Posts: 1296
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Re: error ?

Post by CrazyCat »

Your eggdrop is not in #sohbet (chantojoin) so the [onchan $nick $chantojoin] test can't work.
Eggdrop can only work with chans it's in (except for validchan).
p
pektek
Halfop
Posts: 49
Joined: Sat Jul 01, 2023 4:51 pm

Re: error ?

Post by pektek »

how can we fix it ?
User avatar
CrazyCat
Revered One
Posts: 1296
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Re: error ?

Post by CrazyCat »

You can't fix it by code. The only way is to have the eggdrop in the "chantojoin" channel.
Post Reply