diff options
| author | 2016-04-22 11:48:59 +0100 | |
|---|---|---|
| committer | 2016-04-22 11:48:59 +0100 | |
| commit | f85ab987c449c67c8bfe7947d56d53912ae1cec3 (patch) | |
| tree | 00b24d9704c99f1aa80375b33ede480c7e882e68 | |
| parent | added an op command to channel_op.py. (diff) | |
decided to not track user realnames as there's no real purpose and it means bitbot does not have to whois newly joined people.
| -rw-r--r-- | IRCLineHandler.py | 9 | ||||
| -rw-r--r-- | IRCUser.py | 1 |
2 files changed, 4 insertions, 6 deletions
diff --git a/IRCLineHandler.py b/IRCLineHandler.py index 4ff0acce..61b2d551 100644 --- a/IRCLineHandler.py +++ b/IRCLineHandler.py @@ -83,10 +83,8 @@ def handle_311(): else: target = server.get_user(nickname) username = line_split[4] - realname = Utils.arbitrary(line_split, 7) hostname = line_split[5] target.username = username - target.realname = realname target.hostname = hostname @handler(description="on-join channel topic line") def handle_332(): @@ -121,11 +119,13 @@ def handle_353(): channel.add_mode(mode, nickname) @handler(description="on user joining channel") def handle_JOIN(): - nickname, username, realname = Utils.seperate_hostmask(line_split[0]) + nickname, username, hostname = Utils.seperate_hostmask(line_split[0]) channel = server.get_channel(Utils.remove_colon(line_split[2])) if not server.is_own_nickname(nickname): - server.send_whois(nickname) user = server.get_user(nickname) + if not server.has_user(nickname): + user.username = username + user.hostname = hostname channel.add_user(user) user.join_channel(channel) bot.events.on("received").on("join").call(line=line, @@ -273,7 +273,6 @@ def handle_PRIVMSG(): def handle_352(): user = server.get_user(line_split[7]) user.username = line_split[4] - user.realname = Utils.arbitrary(line_split, 10) user.hostname = line_split[5] @handler(description="response to an empty mode command") def handle_324(): @@ -5,7 +5,6 @@ class User(object): def __init__(self, nickname, server, bot): self.set_nickname(nickname) self.username = None - self.realname = None self.hostname = None self.server = server self.bot = bot |
