| View previous topic :: View next topic |
| Author |
Message |
boehmi Voice
Joined: 11 Apr 2009 Posts: 14 Location: Germany
|
Posted: Thu Sep 17, 2009 12:11 pm Post subject: chanlist doesn't work on join event |
|
|
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 |
|
 |
arfer Master

Joined: 26 Nov 2004 Posts: 436 Location: Manchester, UK
|
Posted: Thu Sep 17, 2009 12:51 pm Post subject: |
|
|
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 |
|
 |
boehmi Voice
Joined: 11 Apr 2009 Posts: 14 Location: Germany
|
Posted: Thu Sep 17, 2009 12:58 pm Post subject: |
|
|
Thank you... it works with a 10 seconds timer
Is there a possibility to quicken the update? |
|
| Back to top |
|
 |
arfer Master

Joined: 26 Nov 2004 Posts: 436 Location: Manchester, UK
|
Posted: Thu Sep 17, 2009 1:18 pm Post subject: |
|
|
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 |
|
 |
boehmi Voice
Joined: 11 Apr 2009 Posts: 14 Location: Germany
|
Posted: Thu Sep 17, 2009 1:25 pm Post subject: |
|
|
No, thats not the task.. it was just an example
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 |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Thu Sep 17, 2009 2:10 pm Post subject: |
|
|
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 |
|
 |
|