297 |
297 |
298 def __query(self, match): |
298 def __query(self, match): |
299 """ |
299 """ |
300 Private method to handle a new private connection. |
300 Private method to handle a new private connection. |
301 |
301 |
302 @param reference to the match object |
302 @param match reference to the match object |
303 @return flag indicating, if the message was handled (boolean) |
303 @return flag indicating, if the message was handled (boolean) |
304 """ |
304 """ |
305 # group(1) sender user name |
305 # group(1) sender user name |
306 # group(2) sender user@host |
306 # group(2) sender user@host |
307 # group(3) target nick |
307 # group(3) target nick |
508 |
508 |
509 def __handleNamedMessage(self, match): |
509 def __handleNamedMessage(self, match): |
510 """ |
510 """ |
511 Private method to handle a server message containing a message name. |
511 Private method to handle a server message containing a message name. |
512 |
512 |
513 @param reference to the match object |
513 @param match reference to the match object |
514 @return flag indicating, if the message was handled (boolean) |
514 @return flag indicating, if the message was handled (boolean) |
515 """ |
515 """ |
516 name = match.group(2) |
516 name = match.group(2) |
517 if name == "NOTICE": |
517 if name == "NOTICE": |
518 try: |
518 try: |
576 |
576 |
577 def __handleNumericMessage(self, match): |
577 def __handleNumericMessage(self, match): |
578 """ |
578 """ |
579 Private method to handle a server message containing a numeric code. |
579 Private method to handle a server message containing a numeric code. |
580 |
580 |
581 @param reference to the match object |
581 @param match reference to the match object |
582 @return flag indicating, if the message was handled (boolean) |
582 @return flag indicating, if the message was handled (boolean) |
583 """ |
583 """ |
584 code = int(match.group(2)) |
584 code = int(match.group(2)) |
585 if code < 400: |
585 if code < 400: |
586 return self.__handleServerReply(code, match.group(1), match.group(3)) |
586 return self.__handleServerReply(code, match.group(1), match.group(3)) |
779 |
779 |
780 def __ping(self, match): |
780 def __ping(self, match): |
781 """ |
781 """ |
782 Private method to handle a PING message. |
782 Private method to handle a PING message. |
783 |
783 |
784 @param reference to the match object |
784 @param match reference to the match object |
785 @return flag indicating, if the message was handled (boolean) |
785 @return flag indicating, if the message was handled (boolean) |
786 """ |
786 """ |
787 self.__send("PONG " + match.group(1)) |
787 self.__send("PONG " + match.group(1)) |
788 return True |
788 return True |
789 |
789 |
790 def __handleCtcp(self, match): |
790 def __handleCtcp(self, match): |
791 """ |
791 """ |
792 Private method to handle a CTCP command. |
792 Private method to handle a CTCP command. |
793 |
793 |
794 @param reference to the match object |
794 @param match reference to the match object |
795 @return flag indicating, if the message was handled (boolean) |
795 @return flag indicating, if the message was handled (boolean) |
796 """ |
796 """ |
797 # group(1) sender user name |
797 # group(1) sender user name |
798 # group(2) sender user@host |
798 # group(2) sender user@host |
799 # group(3) target nick |
799 # group(3) target nick |
890 """ |
890 """ |
891 self.__channelTypePrefixes = prefixes |
891 self.__channelTypePrefixes = prefixes |
892 |
892 |
893 def isChannelName(self, name): |
893 def isChannelName(self, name): |
894 """ |
894 """ |
895 PublicisChannelName method to check, if the given name is a channel name. |
895 Public method to check, if the given name is a channel name. |
896 |
896 |
|
897 @param name name to check (string) |
897 @return flag indicating a channel name (boolean) |
898 @return flag indicating a channel name (boolean) |
898 """ |
899 """ |
899 if not name: |
900 if not name: |
900 return False |
901 return False |
901 |
902 |