Package emma :: Package interface :: Package irc :: Module message
[hide private]
[frames] | no frames]

Source Code for Module emma.interface.irc.message

 1  """ 
 2  irc message support 
 3   
 4  @copyright: (c) 2011 hackmeeting U{http://sindominio.net/hackmeeting} 
 5  @author: Ruben Pollan 
 6  @organization: hackmeeting U{http://sindominio.net/hackmeeting} 
 7  @contact: meskio@sindominio.net 
 8  @license: 
 9    This program is free software; you can redistribute it and/or 
10    modify it under the terms of the Do What The Fuck You Want To 
11    Public License, Version 2, as published by Sam Hocevar. See 
12    U{http://sam.zoy.org/projects/COPYING.WTFPL} for more details. 
13  """ 
14   
15  from irclib import nm_to_n 
16   
17  from emma.interface import message 
18   
19   
20 -class Message(message.Message):
21 """ 22 irc message 23 24 the types can be 'pubmsg', 'privmsg' 25 """
26 - def __init__(self, ircEvent):
27 if ircEvent.arguments(): 28 body = ircEvent.arguments()[-1] 29 else: 30 body = "" 31 to = ircEvent.target() 32 frm = nm_to_n(ircEvent.source()) 33 tpe = ircEvent.eventtype() 34 message.Message.__init__(self, body, to, frm, tpe)
35