| View previous topic :: View next topic |
| Author |
Message |
ultralord Master

Joined: 06 Nov 2006 Posts: 255
|
Posted: Sat Oct 25, 2008 11:18 am Post subject: join/part |
|
|
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: |
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 |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sat Oct 25, 2008 11:35 am Post subject: |
|
|
.+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: | #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, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
ultralord Master

Joined: 06 Nov 2006 Posts: 255
|
Posted: Sat Oct 25, 2008 4:08 pm Post subject: |
|
|
| thnx a lot ;> |
|
| Back to top |
|
 |
|