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 

chanlist doesn't work on join event

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


Joined: 11 Apr 2009
Posts: 14
Location: Germany

PostPosted: Thu Sep 17, 2009 12:11 pm    Post subject: chanlist doesn't work on join event Reply with quote

Hi there,

my problem is, that

Code:
   set users [chanlist $channel]
   putlog [llength $users]


shows zero, when it's called in the join-bind procedure of the bot's join.

Even a utimer of 1 second, called in the join-handler procedure doesn't work

What can i do ?

Thanks for your help
Back to top
View user's profile Send private message
arfer
Master


Joined: 26 Nov 2004
Posts: 436
Location: Manchester, UK

PostPosted: Thu Sep 17, 2009 12:51 pm    Post subject: Reply with quote

A join bind triggers immediately a user joins one of the bots channels and therefore does not give time for the bot to update a chanlist for the channel.

You could use a utimer within the join binds's proc which calls a second user defined proc in a few seconds, thus giving time for the chanlist to be updated. One second is not really enough. Then use your chanlist code in the second proc. You will also have to pass all the other arguments you need from the join bind proc to the second user defined proc.

The exact same thing happens when testing to see if a nick that newly joined the channel has op status. The join bind would not give time for channel services to op nick.
_________________
I must have had nothing to do
Back to top
View user's profile Send private message
boehmi
Voice


Joined: 11 Apr 2009
Posts: 14
Location: Germany

PostPosted: Thu Sep 17, 2009 12:58 pm    Post subject: Reply with quote

Thank you... it works with a 10 seconds timer
Is there a possibility to quicken the update?
Back to top
View user's profile Send private message
arfer
Master


Joined: 26 Nov 2004
Posts: 436
Location: Manchester, UK

PostPosted: Thu Sep 17, 2009 1:18 pm    Post subject: Reply with quote

Not that I know of, other than ensuring resources are not wasted on extensive pointless tasks. I think you will need an expert on the inner working of eggdrop to give a definitive answer though.

If all you are doing is logging the channel numbers in the partyline, I wouldn't have thought it warranted any sort of special effort.
_________________
I must have had nothing to do
Back to top
View user's profile Send private message
boehmi
Voice


Joined: 11 Apr 2009
Posts: 14
Location: Germany

PostPosted: Thu Sep 17, 2009 1:25 pm    Post subject: Reply with quote

No, thats not the task.. it was just an example Wink

We have an authorization-system and the bot is part of it.
If he restarts for any reason, he just shall kill all users in the channel, so they have to reconnect und re-auth with the bot.
Back to top
View user's profile Send private message
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Thu Sep 17, 2009 2:10 pm    Post subject: Reply with quote

try bind the raw event of the /names or /who reply from the channel, since it takes a while for it to show on the dcc party line, eggdrop should request this information when it first joins the channel.
_________________
TCL the misunderstood
Back to top
View user's profile Send private message Send e-mail
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