.BANCHO. Use streams for public chat
This commit is contained in:
@@ -89,4 +89,10 @@ class unknownStreamException(Exception):
|
||||
pass
|
||||
|
||||
class userTournamentException(Exception):
|
||||
pass
|
||||
|
||||
class userAlreadyInChannelException(Exception):
|
||||
pass
|
||||
|
||||
class userNotInChannelException(Exception):
|
||||
pass
|
@@ -656,7 +656,7 @@ def pp(fro, chan, message):
|
||||
pp = userUtils.getPP(token.userID, gameMode)
|
||||
return "You have {:,} pp".format(pp)
|
||||
|
||||
def updateBeatmap(fro, chan, to):
|
||||
def updateBeatmap(fro, chan, message):
|
||||
try:
|
||||
# Run the command in PM only
|
||||
if chan.startswith("#"):
|
||||
|
@@ -155,11 +155,13 @@ def channelJoinSuccess(userID, chan):
|
||||
return packetHelper.buildPacket(packetIDs.server_channelJoinSuccess, [[chan, dataTypes.STRING]])
|
||||
|
||||
def channelInfo(chan):
|
||||
if chan not in glob.channels.channels:
|
||||
return bytes()
|
||||
channel = glob.channels.channels[chan]
|
||||
return packetHelper.buildPacket(packetIDs.server_channelInfo, [
|
||||
[chan, dataTypes.STRING],
|
||||
[channel.name, dataTypes.STRING],
|
||||
[channel.description, dataTypes.STRING],
|
||||
[len(channel.connectedUsers), dataTypes.UINT16]
|
||||
[len(glob.streams.streams["chat/{}".format(chan)].clients), dataTypes.UINT16]
|
||||
])
|
||||
|
||||
def channelInfoEnd():
|
||||
|
Reference in New Issue
Block a user