List Info

Thread: PyMSN-t patch: feature




PyMSN-t patch: <enableAutoInvite/> feature
country flaguser name
Germany
2007-03-08 04:34:13
Hi James,

attached you will find a patch for PyMSN-t that introduces
the 
<enableAutoInvite/> feature known from PyICQ-t and
PyAIM-t: After the 
component is connected to the jabber server it probes
presence from all 
registerered users triggering then to log in immediately.

To enable the feature insert an <enableAutoInvite/>
node into your 
config.xml.

Thanks for integrating the patch into SVN. (I suppose it is
not publicly 
writable?)

Regards,

-Michael


_______________________________________________
py-transports mailing list
py-transportsblathersource.org
http://lists.modevia.com/cgi-bin/mailman/listinfo
/py-transports

  
Re: PyMSN-t patch: <enableAutoInvite/> feature
user name
2007-03-08 08:55:35
Is this a good ideia? I have 600k registered users.... 

Anyway, I would just recommend that if this patch makes it
to the  
official software, at least a comment stating that:

  1. if you are using a cluster setup, *do not* enable this
option,  
it will most likely break your setup;
  2. if you have a lot of users, this could add a lot of
delay to the  
startup process.

Best regards,

On Mar 8, 2007, at 10:34 AM, Michael Dyrna wrote:

> Hi James,
>
> attached you will find a patch for PyMSN-t that
introduces the  
> <enableAutoInvite/> feature known from PyICQ-t
and PyAIM-t: After  
> the component is connected to the jabber server it
probes presence  
> from all registerered users triggering then to log in
immediately.
>
> To enable the feature insert an
<enableAutoInvite/> node into your  
> config.xml.
>
> Thanks for integrating the patch into SVN. (I suppose
it is not  
> publicly writable?)
>
> Regards,
>
> -Michael
>
> diff -rNu pymsnt.orig/trunk/src/config.py
pymsnt/trunk/src/config.py
> --- src/config.py	2007-03-07 17:03:29.000000000 +0100
> +++ src/config.py	2007-03-07 17:07:17.000000000 +0100
>  -37,3 +37,5 
>  debugLevel = "0" # 0->None,
1->Traceback, 2->WARN,ERROR, 3- 
> >INFO,WARN,ERROR
>  _debugLevel = 0 # Maintained by debug.reloadConfig as
an int
>  debugFile = ""
> +
> +enableAutoInvite = bool(False)
> diff -rNu pymsnt.orig/trunk/src/main.py
pymsnt/trunk/src/main.py
> --- src/main.py	2007-03-07 17:03:29.000000000 +0100
> +++ src/main.py	2007-03-07 17:08:27.000000000 +0100
>  -228,6 +228,7 
>  			x.attributes["protocol-version"] =
"1.0"
>  			x.attributes["config-ns"] = legacy.url +
"/component"
>  			self.send(pres)
> +		self.sendInvitations()
>  	
>  	def componentDisconnected(self):
>  		LogEvent(INFO)
>  -325,6 +326,13 
>  				#	# Send this subscription
>  				#	s.onPresence(el)
>
> +	def sendInvitations(self):
> +		if config.enableAutoInvite:
> +			for jid in self.xdb.getRegistrationList():
> +				LogEvent(INFO, msg="Inviting %r" % jid)
> +				jabw.sendPresence(self, jid, config.jid,
ptype="probe")
> +				jabw.sendPresence(self, jid,
"%s/registered" % (config.jid),  
> ptype="probe")
> +
>
>  class App:
>  	def __init__(self):
> diff -rNu pymsnt.orig/trunk/src/xdb.py
pymsnt/trunk/src/xdb.py
> --- src/xdb.py	2007-03-07 17:03:29.000000000 +0100
> +++ src/xdb.py	2007-03-07 17:21:42.000000000 +0100
>  -67,7 +67,11 
>  			LogEvent(WARN, "", "IOError " +
str(e))
>  			raise
>  		os.umask(prev_umask)
> -	
> +
> +	def getRegistrationList(self):
> +		""" Returns an array of all of the
registered jids. """
> +		return self.files()
> +
>  	def files(self):
>  		""" Returns a list containing the
files in the current XDB  
> database """
>  		files = []
> _______________________________________________
> py-transports mailing list
> py-transportsblathersource.org
> http://lists.modevia.com/cgi-bin/mailman/listinfo
/py-transports

--
HIId: Pedro Melo
SMTP: meloco.sapo.pt
XMPP: pedro.melosapo.pt

_______________________________________________
py-transports mailing list
py-transportsblathersource.org
http://lists.modevia.com/cgi-bin/mailman/listinfo
/py-transports

Re: PyMSN-t patch: <enableAutoInvite/> feature
country flaguser name
United States
2007-03-08 09:10:36
FWIW, it's disabled by default in PyAIMt and PyICQt.  =)

Daniel

On Mar 8, 2007, at 9:55 AM, Pedro Melo wrote:

> Is this a good ideia? I have 600k registered users....

>
> Anyway, I would just recommend that if this patch makes
it to the
> official software, at least a comment stating that:
>
>   1. if you are using a cluster setup, *do not* enable
this option,
> it will most likely break your setup;
>   2. if you have a lot of users, this could add a lot
of delay to the
> startup process.
>
> Best regards,
>
> On Mar 8, 2007, at 10:34 AM, Michael Dyrna wrote:
>
>> Hi James,
>>
>> attached you will find a patch for PyMSN-t that
introduces the
>> <enableAutoInvite/> feature known from
PyICQ-t and PyAIM-t: After
>> the component is connected to the jabber server it
probes presence
>> from all registerered users triggering then to log
in immediately.
>>
>> To enable the feature insert an
<enableAutoInvite/> node into your
>> config.xml.
>>
>> Thanks for integrating the patch into SVN. (I
suppose it is not
>> publicly writable?)
>>
>> Regards,
>>
>> -Michael
>>
>> diff -rNu pymsnt.orig/trunk/src/config.py
pymsnt/trunk/src/config.py
>> --- src/config.py	2007-03-07 17:03:29.000000000
+0100
>> +++ src/config.py	2007-03-07 17:07:17.000000000
+0100
>>  -37,3 +37,5 
>>  debugLevel = "0" # 0->None,
1->Traceback, 2->WARN,ERROR, 3-
>>> INFO,WARN,ERROR
>>  _debugLevel = 0 # Maintained by debug.reloadConfig
as an int
>>  debugFile = ""
>> +
>> +enableAutoInvite = bool(False)
>> diff -rNu pymsnt.orig/trunk/src/main.py
pymsnt/trunk/src/main.py
>> --- src/main.py	2007-03-07 17:03:29.000000000
+0100
>> +++ src/main.py	2007-03-07 17:08:27.000000000
+0100
>>  -228,6 +228,7 
>>  			x.attributes["protocol-version"] =
"1.0"
>>  			x.attributes["config-ns"] =
legacy.url + "/component"
>>  			self.send(pres)
>> +		self.sendInvitations()
>>  	
>>  	def componentDisconnected(self):
>>  		LogEvent(INFO)
>>  -325,6 +326,13 
>>  				#	# Send this subscription
>>  				#	s.onPresence(el)
>>
>> +	def sendInvitations(self):
>> +		if config.enableAutoInvite:
>> +			for jid in self.xdb.getRegistrationList():
>> +				LogEvent(INFO, msg="Inviting %r" %
jid)
>> +				jabw.sendPresence(self, jid, config.jid,
ptype="probe")
>> +				jabw.sendPresence(self, jid,
"%s/registered" % (config.jid),
>> ptype="probe")
>> +
>>
>>  class App:
>>  	def __init__(self):
>> diff -rNu pymsnt.orig/trunk/src/xdb.py
pymsnt/trunk/src/xdb.py
>> --- src/xdb.py	2007-03-07 17:03:29.000000000 +0100
>> +++ src/xdb.py	2007-03-07 17:21:42.000000000 +0100
>>  -67,7 +67,11 
>>  			LogEvent(WARN, "", "IOError
" + str(e))
>>  			raise
>>  		os.umask(prev_umask)
>> -	
>> +
>> +	def getRegistrationList(self):
>> +		""" Returns an array of all of
the registered jids. """
>> +		return self.files()
>> +
>>  	def files(self):
>>  		""" Returns a list containing the
files in the current XDB
>> database """
>>  		files = []
>> _______________________________________________
>> py-transports mailing list
>> py-transportsblathersource.org
>> http://lists.modevia.com/cgi-bin/mailman/listinfo
/py-transports
>
> --
> HIId: Pedro Melo
> SMTP: meloco.sapo.pt
> XMPP: pedro.melosapo.pt
>
> _______________________________________________
> py-transports mailing list
> py-transportsblathersource.org
> http://lists.modevia.com/cgi-bin/mailman/listinfo
/py-transports

_______________________________________________
py-transports mailing list
py-transportsblathersource.org
http://lists.modevia.com/cgi-bin/mailman/listinfo
/py-transports

Re: Use of config.host for tcp bind in PyMSNt
country flaguser name
Russian Federation
2007-03-16 11:34:12
On Friday 16 March 2007 14:38, Safford, Brian wrote:
Hello Brian
Please re-submit this diff making it 'uniform'
i.e. diff -ur old_folder/ new_folder/
otherwise it is almost unusable.
-- 
Respectfully
Alexey Nezhdanov
_______________________________________________
py-transports mailing list
py-transportsblathersource.org
http://lists.modevia.com/cgi-bin/mailman/listinfo
/py-transports

Re: Use of config.host for tcp bind in PyMSNt
country flaguser name
United States
2007-03-16 12:34:26
Sorry about that ... have attached a more appropriate diff.

trunk/ is the old folder
pymsnt/ is the new folder

-----Original Message-----
From: py-transports-bouncesblathersource.org
[mailto:py-transports-bouncesblathersource.org] On
Behalf Of Alexey
Nezhdanov
Sent: Friday, March 16, 2007 12:34 PM
To: PyTransports Discussion
Subject: Re: [py-transports] Use of config.host for tcp bind
in PyMSNt

On Friday 16 March 2007 14:38, Safford, Brian wrote:
Hello Brian
Please re-submit this diff making it 'uniform'
i.e. diff -ur old_folder/ new_folder/
otherwise it is almost unusable.
--
Respectfully
Alexey Nezhdanov
_______________________________________________
py-transports mailing list
py-transportsblathersource.org
http://lists.modevia.com/cgi-bin/mailman/listinfo
/py-transports

_______________________________________________
py-transports mailing list
py-transportsblathersource.org
http://lists.modevia.com/cgi-bin/mailman/listinfo
/py-transports

  
[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )