Parse most of IRC messages in server part instead of core
This commit is contained in:
parent
db22436e5d
commit
7dc3b55c34
3 changed files with 127 additions and 87 deletions
|
|
@ -72,7 +72,10 @@ class SocketServer(AbstractServer):
|
|||
self.socket.send(cnt)
|
||||
|
||||
def format(self, txt):
|
||||
return txt.encode() + b'\r\n'
|
||||
if isinstance(txt, bytes):
|
||||
return txt + b'\r\n'
|
||||
else:
|
||||
return txt.encode() + b'\r\n'
|
||||
|
||||
def read(self):
|
||||
if self.socket is None: return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue