Cleaned spammy output to IMC users from IRC and evennia channels, where channel names tended to be added
after one another several times. IMC is not seeing the IRC channel name anymore, output should be on the standard simple name@MUD: msg format as far as IMC is concerned. /Griatch
This commit is contained in:
parent
eebfa0d387
commit
5e8a047111
5 changed files with 52 additions and 20 deletions
|
|
@ -19,7 +19,7 @@ def cemit_info(message):
|
|||
"""
|
||||
Send info to default info channel
|
||||
"""
|
||||
comsys.send_cmessage(settings.COMMCHAN_IRC_INFO, 'IRC: %s' % message,from_external="IRC")
|
||||
comsys.send_cmessage(settings.COMMCHAN_IRC_INFO, 'IRC: %s' % message)
|
||||
|
||||
class IRC_Bot(irc.IRCClient):
|
||||
|
||||
|
|
@ -55,7 +55,10 @@ class IRC_Bot(irc.IRCClient):
|
|||
user = user.split("!")[0]
|
||||
if user:
|
||||
user.strip()
|
||||
msg = "%s@%s: %s" % (user,irc_channel,msg)
|
||||
else:
|
||||
user = "Unknown"
|
||||
|
||||
msg = "%s@%s: %s" % (user,irc_channel,msg.strip())
|
||||
#logger.log_infomsg("<IRC: " + msg)
|
||||
|
||||
for mapping in mappings:
|
||||
|
|
@ -71,6 +74,7 @@ class IRC_Bot(irc.IRCClient):
|
|||
self.msg(self.factory.channel, msg)
|
||||
#logger.log_infomsg(">IRC: " + msg)
|
||||
|
||||
|
||||
class IRC_BotFactory(protocol.ClientFactory):
|
||||
protocol = IRC_Bot
|
||||
def __init__(self, channel, network, nickname):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue