diff --git a/protocols/inspircd.py b/protocols/inspircd.py index 52a9171..c62b7e0 100644 --- a/protocols/inspircd.py +++ b/protocols/inspircd.py @@ -367,7 +367,15 @@ def handle_pong(irc, source, command, args): irc.lastping = time.time() def handle_privmsg(irc, source, command, args): - return {'target': args[0], 'text': args[1]} + # <- :70MAAAAAA PRIVMSG #dev :afasfsa + # <- :70MAAAAAA NOTICE 0ALAAAAAA :afasfsa + target = args[0] + # We use lowercase channels internally, but uppercase UIDs. + if utils.isChannel(target): + target = target.lower() + return {'target': target, 'text': args[1]} + +handle_notice = handle_privmsg def handle_kill(irc, source, command, args): killed = args[0] @@ -691,11 +699,6 @@ def handle_encap(irc, numeric, command, args): return {'parse_as': real_command, 'channel': channel, 'text': text} -def handle_notice(irc, numeric, command, args): - # <- :70MAAAAAA NOTICE #dev :afasfsa - # <- :70MAAAAAA NOTICE 0ALAAAAAA :afasfsa - return {'target': args[0], 'text': args[1]} - def handle_opertype(irc, numeric, command, args): # This is used by InspIRCd to denote an oper up; there is no MODE # command sent for it.