From 58a4215690fa0ecf5b96c67995ee8356bf4bad17 Mon Sep 17 00:00:00 2001 From: James Lu Date: Thu, 29 Jun 2017 21:55:52 -0700 Subject: [PATCH] ratbox: fix support for merged Irc/proto --- protocols/ratbox.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/protocols/ratbox.py b/protocols/ratbox.py index 07d01a0..112cc74 100644 --- a/protocols/ratbox.py +++ b/protocols/ratbox.py @@ -18,6 +18,8 @@ class RatboxProtocol(TS6Protocol): def post_connect(self): """Initializes a connection to a server.""" + super().post_connect() + # Note: +r, +e, and +I support will be negotiated on link self.cmodes = {'op': 'o', 'secret': 's', 'private': 'p', 'noextmsg': 'n', 'moderated': 'm', 'inviteonly': 'i', 'topiclock': 't', 'limit': 'l', 'ban': 'b', 'voice': 'v', @@ -68,14 +70,15 @@ class RatboxProtocol(TS6Protocol): realhost=realhost, ip=ip, manipulatable=manipulatable) self.applyModes(uid, modes) self.servers[server].users.add(uid) - self._send(server, "UID {nick} 1 {ts} {modes} {ident} {host} {ip} {uid} " - ":{realname}".format(ts=ts, host=host, - nick=nick, ident=ident, uid=uid, - modes=raw_modes, ip=ip, realname=realname)) + + self._send_with_prefix(server, "UID {nick} 1 {ts} {modes} {ident} {host} {ip} {uid} " + ":{realname}".format(ts=ts, host=host, + nick=nick, ident=ident, uid=uid, + modes=raw_modes, ip=ip, realname=realname)) if orig_realhost: # If real host is specified, send it using ENCAP REALHOST - self._send(uid, "ENCAP * REALHOST %s" % orig_realhost) + self._send_with_prefix(uid, "ENCAP * REALHOST %s" % orig_realhost) return u