#NEWLINE# def doPrivmsg( self , irc , msg ) : #NEWLINE# #INDENT# if ( ircmsgs . isCtcp ( msg ) and ( not ircmsgs . isAction ( msg ) ) ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# ( channel , text ) = msg . args #NEWLINE# if irc . isChannel ( channel ) : #NEWLINE# #INDENT# irc = self . _getRealIrc ( irc ) #NEWLINE# if ( channel not in self . registryValue ( 'channels' ) ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# ignores = self . registryValue ( 'ignores' , channel ) #NEWLINE# for ignore in ignores : #NEWLINE# #INDENT# if ircutils . hostmaskPatternEqual ( ignore , msg . prefix ) : #NEWLINE# #INDENT# self . log . debug ( 'Refusing to relay %s, ignored by %s.' , msg . prefix , ignore ) #NEWLINE# return #NEWLINE# #UNINDENT# #UNINDENT# if self . _checkRelayMsg ( msg ) : #NEWLINE# #INDENT# if self . registryValue ( 'punishOtherRelayBots' , channel ) : #NEWLINE# #INDENT# self . _punishRelayers ( msg ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . log . warning ( 'Refusing to relay message from %s, it appears to be a relay message.' , msg . prefix ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# network = self . _getIrcName ( irc ) #NEWLINE# s = self . _formatPrivmsg ( msg . nick , network , msg ) #NEWLINE# m = self . _msgmaker ( channel , s ) #NEWLINE# self . _sendToOthers ( irc , m )