Closed Aegil closed 11 years ago
Also interested in how to display the Chat Skype id and name? For example: Skype: tom34 Name: Korbin Korbin says !Bot Bot says: Hi * Korbin * your skype * tom34 *
Let's think a protocol for this. There is no reason why it shouldn't do it. Would environment variables be good?
SKYPE_SENDER_USERNAME SKYPE_SENDER_NAME
etc.
This way it would not mess with command line.
Please think anything for you for a wishlist.
Then let's implement a simple example. We can extend "sad" example.
Environmental variables would be perfect for what I need. Which API calls / api are you using and I could look through the docs to see if there is anything else that would be valuable? I think the above you suggested are perfect currently.
First you need to make this call to extract necessary data from Skype4Py API:
https://github.com/opensourcehacker/sevabot/blob/master/sevabot/bot/bot.py#L110
https://github.com/opensourcehacker/sevabot/blob/master/sevabot/bot/modules.py#L56
I think if there are several "extras" it's the best to pass them as a dictionary argument.
Then you pass them forward in Popen():
https://github.com/opensourcehacker/sevabot/blob/master/sevabot/bot/modules.py#L76
like here:
Implemented in dev branch https://github.com/opensourcehacker/sevabot/blob/dev/modules/sad.py
Hey, is it possible for sevabot to pass the userid of the person running the command. So for example if paul or ryan ran a command it would pass their skype id to the script so we can use it as a basic level of authentication in the script as well as allowing the scripts to store data user specifically. I can see in the debug output that the information is received by the sevabot process but not sure if this is implemented currently as an option.