I have implemented on my leaf the someone_did_join_channel event and I have noticed the following:
I really do not understand at what point the users get updated with their proper channel levels. This is very confusing
Some further info. If the user is a channel operator (+o) the whole thing works as expected. I can see the problem with admins and channel owners only. Here is the difference when a channel operator joins and when owner/admin joins:
I have some further info regarding this issue. I was able to reproduce the problem with channel operators as well. If the channel operator has a greet message then I can see the problem. Example of channel operator with greet message joining channel:
In addition, i have set type: op for one of my leafs in leaves.yml and implemented a method which uses authentication as follows:
def test_command(stem, sender, reply_to, message)
# do stuff
ann :test_command, :protected => true
The bot will return "Only an op can do that" if one of the cases i described occur. It will work normal if the user is a channel operator without a greet message.
I have some more info. I though that if it's a channel operator without a greet message it will work properly but it seems that I didn't took under consideration that I had a sleep(2) before I make the call to stem.privilege. If i remove the sleep the problem is 100% reproducible. Looks like that the users are not refreshed on time/properly but if I add the sleep the users refresh completes on time.
This is the code which I have and it only works properly with chan ops without greet message:
def someone_did_join_channel(stem, sender, channel)
privilege = stem.privilege(channel, sender[:nick])
Waiting for your comments Tim and hopefully for a solution. This is causing way too much headache for me at the moment.
Any updates on the issue? =/
Over a month and still no reply...