Do not relay joins and parts.

This causes way too many messages from the bot. It would be useful to query
the bot for a list of who is in the other relayed channels, but that is
for a later time, if at all. If need be relaying joins and parts could
also be configurable.
This commit is contained in:
Steve Dougherty 2012-05-14 20:58:26 -04:00
parent f7a3df85bf
commit c18c47ca0e
1 changed files with 12 additions and 2 deletions

View File

@ -158,8 +158,18 @@ class RelayFactory(ReconnectingClientFactory):
x.factory = self
return x
class SilentJoinPart(IRCRelayer):
def userJoined(self, user, channel):
pass
def userLeft(self, user, channel):
pass
def userQuit(self, user, quitMessage):
pass
#Remove the _<numbers> that FLIP puts on the end of usernames.
class FLIPRelayer(IRCRelayer):
class FLIPRelayer(SilentJoinPart):
def formatUsername(self, username):
return re.sub("_\d+$", "", IRCRelayer.formatUsername(self, username))
@ -167,7 +177,7 @@ class FLIPFactory(RelayFactory):
protocol = FLIPRelayer
#Identify with NickServ upon connecting, and wait for recognition before joining the channel.
class NickServRelayer(IRCRelayer):
class NickServRelayer(SilentJoinPart):
NickServ = "nickserv"
def signedOn(self):