コード例 #1
0
 def send_ctcp(self, target, command, params=None):
     """ Sends a CTCP (Client-to-Client-Protocol) message to the target. 
     
     """
     if params is not None:
         params.insert(0, command)
         self.send_message(target, ctcp.tag(" ".join(params)))
     else:
         self.send_message(target, ctcp.tag(command))
コード例 #2
0
 def send_ctcp_reply(self, target, command, params=None):
     """ Sends a CTCP reply message to the target. 
     This differs from send_ctcp() because it uses NOTICE instead, as
     specified by the CTCP documentation.
     
     """
     if params is not None:
         params.insert(0, command)
         self.send_notice(target, ctcp.tag(" ".join(params)))
     else:
         self.send_notice(target, ctcp.tag(command))