Skip to content

Commit

Permalink
just nine before de 8 and 10, i need to sleep, pls
Browse files Browse the repository at this point in the history
  • Loading branch information
arthunix committed Jun 7, 2023
1 parent 7be9783 commit 2630a4f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions servidor
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,18 @@ def dados_recebidos(conexao, dados):
for i in servidor.chan_db[pUpper]:
servidor.chan_db[pUpper][i].enviar(b':' + connectionNick + b' JOIN :' + payload + b'\r\n')

members = b''
for i in sorted(servidor.chan_db[pUpper].keys()):
members += i + b' '
send = b':server 353 ' + connectionNick + b' = ' + payload + b' :' + members

while len(send) > 510: # len('\r\n') = 2
residuals = send[:510]
conexao.enviar(send + b'\r\n')
send = residuals
conexao.enviar(send + b'\r\n' + b':server 366 ' + connectionNick + b' ' + payload + b' :End of /NAMES list.\r\n')


if command.upper() == b'PART':
pIgnored = payload.split(b' ')[0]
pUpper = payload.split(b' ')[0].upper()
Expand Down

0 comments on commit 2630a4f

Please sign in to comment.