pvl/irker.py
changeset 71 11b267e1b2b0
parent 48 40ccb8d3c96e
child 72 7bb07131c2b5
equal deleted inserted replaced
70:c8ec745a2aaa 71:11b267e1b2b0
    72         self.file = file
    72         self.file = file
    73 
    73 
    74         log.debug("%s", file)
    74         log.debug("%s", file)
    75 
    75 
    76     def send (self, **opts) :
    76     def send (self, **opts) :
       
    77         log.debug("%s", opts)
       
    78 
    77         json.dump(opts, self.file)
    79         json.dump(opts, self.file)
    78         self.file.write('\n')
    80         self.file.write('\n')
    79         self.file.flush()
    81         self.file.flush()
    80 
    82 
    81     def join (self, to) :
    83     def join (self, to) :
       
    84         log.info("%s", to)
    82         self.send(to=to, privmsg='')
    85         self.send(to=to, privmsg='')
    83 
    86 
    84     def privmsg (self, to, *args) :
    87     def privmsg (self, to, *args) :
    85         for arg in args :
    88         for arg in args :
       
    89             log.info("%s: %s", to, arg)
    86             self.send(to=to, privmsg=arg)
    90             self.send(to=to, privmsg=arg)
    87 
    91 
    88 import urlparse
    92 import urlparse
    89 import functools
    93 import functools
    90 
    94