egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

join/part

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
ultralord
Master


Joined: 06 Nov 2006
Posts: 255

PostPosted: Sat Oct 25, 2008 11:18 am    Post subject: join/part Reply with quote

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
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Sat Oct 25, 2008 11:35 am    Post subject: Reply with quote

.+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
View user's profile Send private message
ultralord
Master


Joined: 06 Nov 2006
Posts: 255

PostPosted: Sat Oct 25, 2008 4:08 pm    Post subject: Reply with quote

thnx a lot ;>
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber