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.

join/part

Help for those learning Tcl or writing their own scripts.
Post Reply
User avatar
ultralord
Master
Posts: 255
Joined: Mon Nov 06, 2006 6:52 pm

join/part

Post by ultralord »

Hello,

can i put one code one of my tcl and when some proc run bot join into a channel and with other proc part from this channel

i try with +chan but cant ready offcource. any solution?

example my tcl :

Code: Select all

proc g_spamjoin { nick uhost handle arg } {
global g_spamchannel g_spamchannel2 g_spamchannel3 g_spamchannel4 g_spamchannel5 g_spamchannel6 g_spamchannel7 g_spamchannel8 g_spamchannel9 g_spamnum
set g_spamnum [lindex $arg 0]
if { $g_spamnum == 1 } {
set g_spamchannel [lindex $arg 1]
+chan $g_spamchannel
..
...
..
thnx
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

.+chan is a dcc partyline command, it will not work with tcl scripting. You have to use the tcl API for this (see doc/tcl-commands.doc for a full listing).
The command you are looking for is called channel, see a few examples below:

Code: Select all

#Add channel #mychan with default settings
channel add #mychan

#Add channel #mychan with some custom settings
channel add #mychan [list +greet -bitch +autoop]

#Remove channel #mychan
channel remove #mychan
There are other options available with the channel command, see the doc/tcl-commands.doc document for full documentation.

On a sidenote, you really should'nt use lindex with untrusted strings. Please considder using split to convert the string into a list.
NML_375
User avatar
ultralord
Master
Posts: 255
Joined: Mon Nov 06, 2006 6:52 pm

Post by ultralord »

thnx a lot ;>
Post Reply