2 # vim:fileencoding=utf-8
4 from google
.appengine
.api
import xmpp
5 from google
.appengine
.api
import memcache
8 old_send_presence
= xmpp
.send_presence
9 old_send_message
= xmpp
.send_message
12 name
= '%s_%s' % (type, datetime
.datetime
.now().strftime('%Y-%m-%d_%H'))
13 memcache
.incr(name
, initial_value
=0)
15 def send_presence(*args
, **kwargs
):
17 old_send_presence(*args
, **kwargs
)
19 def send_message(*args
, **kwargs
):
21 old_send_message(*args
, **kwargs
)
23 xmpp
.send_presence
= send_presence
24 xmpp
.send_message
= send_message