added some more mode event firing and removed unneeded debug printing.
This commit is contained in:
parent
a348bf4241
commit
9567ad4784
2 changed files with 5 additions and 7 deletions
|
@ -196,7 +196,8 @@ def handle_MODE():
|
||||||
channel = server.get_channel(target)
|
channel = server.get_channel(target)
|
||||||
remove = False
|
remove = False
|
||||||
args = line_split[4:]
|
args = line_split[4:]
|
||||||
for i, char in enumerate(line_split[3]):
|
modes = line_split[3]
|
||||||
|
for i, char in enumerate(modes):
|
||||||
if char == "+":
|
if char == "+":
|
||||||
remove = False
|
remove = False
|
||||||
elif char == "-":
|
elif char == "-":
|
||||||
|
@ -216,8 +217,8 @@ def handle_MODE():
|
||||||
else:
|
else:
|
||||||
args.pop(0)
|
args.pop(0)
|
||||||
bot.events.on("received").on("mode").call(
|
bot.events.on("received").on("mode").call(
|
||||||
line=line, line_split=line_split, server=server, bot=bot,
|
line=line, line_split=line_split, server=server, modes=modes,
|
||||||
modes=modes, args=args, channel=channel)
|
args=args, channel=channel)
|
||||||
elif server.is_own_nickname(target):
|
elif server.is_own_nickname(target):
|
||||||
modes = Utils.remove_colon(line_split[3])
|
modes = Utils.remove_colon(line_split[3])
|
||||||
remove = False
|
remove = False
|
||||||
|
@ -232,8 +233,7 @@ def handle_MODE():
|
||||||
else:
|
else:
|
||||||
server.add_own_mode(char)
|
server.add_own_mode(char)
|
||||||
bot.events.on("self").on("mode").call(
|
bot.events.on("self").on("mode").call(
|
||||||
line=line, line_split=line_split, server=server, bot=bot,
|
line=line, line_split=line_split, server=server, modes=modes)
|
||||||
modes=modes)
|
|
||||||
@handler(description="I've been invited somewhere")
|
@handler(description="I've been invited somewhere")
|
||||||
def handle_INVITE():
|
def handle_INVITE():
|
||||||
nickname, username, hostname = Utils.seperate_hostmask(line_split[0])
|
nickname, username, hostname = Utils.seperate_hostmask(line_split[0])
|
||||||
|
|
|
@ -193,8 +193,6 @@ class Server(object):
|
||||||
if action:
|
if action:
|
||||||
message = message.split("\01ACTION ", 1)[1][:-1]
|
message = message.split("\01ACTION ", 1)[1][:-1]
|
||||||
if self.has_channel(target):
|
if self.has_channel(target):
|
||||||
print("logging line:")
|
|
||||||
print("channel: %s" % target)
|
|
||||||
self.get_channel(target).log.add_line(None, message, action, True)
|
self.get_channel(target).log.add_line(None, message, action, True)
|
||||||
else:
|
else:
|
||||||
self.get_user(target).log.add_line(None, message, action, True)
|
self.get_user(target).log.add_line(None, message, action, True)
|
||||||
|
|
Loading…
Reference in a new issue