man.... I don't know what to say !! what you have done is just
brilliant !!! thank you !
kgschlosser wrote: Tue Jan 30, 2018 10:36 am
OK this is a working version...
There is one issue with it but seeing as it is the "old way" I do not know if I will bother to fix it.
Port 5223 does not work. it gets stuck in a never ending loop. and that port has been replaced with 5222 so the plugin is defaulted to that port.
I didn't quite understand what was the bug ? is it the fact that we're not able to use port 5223 or something else ? if you're talking about that, then it's not a bug ! I never used this port, the default xmpp port is 5222 :
https://www.iana.org/assignments/servic ... l?&page=90
https://tools.ietf.org/html/rfc6120
kgschlosser wrote: Tue Jan 30, 2018 10:36 am
you have 2 actions. one to send messages and the other to send presence.
you get 2 events one for incoming messages and one for incoming presences.
the payload of those events are objects. and there are a few specific features of each
message payload
Code: Select all
message = eg.event.payload
print message.sender
print message.body
print message.room
print message.type
print message.subject
message.reply('This is a reply')
presence payload
Code: Select all
presence = eg.event.payload
print presence.sender
print presence.type
print presence.priority
print presence.status
presence.unsubscribe()
I like the way you handled this, it's more complete than with the previous plugin, wouldn't be more clean or should I say more meaningful to get all these information in the event/payload itself ? for example, instead of this line :
XMPPPlus.Incoming.Message <class 'eg.UserPluginModule.XMPPPlus.Message'>
it would be better to have something like this I guess :
XMPPPlus.Incoming.Message [sender, body, room, type, subject]
we could apply the mechanism for the presence event as well :
XMPPPlus.Incoming.Presence <class 'eg.UserPluginModule.XMPPPlus.Presence'>
use this instead :
XMPPPlus.Incoming.Presence [sender, type, priority, status]
What do you think about it ? it's just a suggestion, but I suppose you did the way you did for a specific reason ? what is it ?
I think it will be more useful, and it will avoid having several times the same line at login

(each line below corresponds to one contact) :
Code: Select all
12:44:02 XMPP Plus: Connected
12:44:02 XMPP Plus: Authentication Successful
12:44:02 XMPP Plus: Session Started
12:44:02 XMPPPlus.Incoming.Presence <class 'eg.UserPluginModule.XMPPPlus.Presence'>
12:44:02 XMPPPlus.Incoming.Presence <class 'eg.UserPluginModule.XMPPPlus.Presence'>
12:44:02 XMPPPlus.Incoming.Presence <class 'eg.UserPluginModule.XMPPPlus.Presence'>
12:44:02 XMPPPlus.Incoming.Presence <class 'eg.UserPluginModule.XMPPPlus.Presence'>
12:44:02 XMPPPlus.Incoming.Presence <class 'eg.UserPluginModule.XMPPPlus.Presence'>
12:44:02 XMPP Plus: Roster Received
or even better, you keep your current method, and just generate an extra event like I specified it above ? I don't know, you tell me what's best. I must admit that your way has several advantages the only drawback is that it's not user friendly in EG log panel and we don't know exactly what's happening until we use some scripting code to display things.
kgschlosser wrote: Tue Jan 30, 2018 10:36 am
If you are running into an issue please delete your debugging log file. go into the __init__.py file of the plugin and change DEBUGGING = False to DEBUGGING = True then start EG with the -debug command line switch. This is going to cause all kinds of debugging data to print out. once you have encountered the problem exit EG and attach that debugging log file to a forum post. the debugging log file is located in %appdata%\eventghost the file is log.txt
So far, everything works just fine, i can send/receive messages without a hitch !

you're really awesome ! I'm going to play around with it and if I encounter anything I will let you know.