You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
584 B
Python

import main
def sendData(addr, data):
main.connections[addr].send(data)
def sendSuccess(addr, data):
sendData(addr, "[y] " + data)
def sendFailure(addr, data):
sendData(addr, "[n] " + data)
def sendInfo(addr, data):
sendData(addr, "[i] " + data)
def sendAll(data):
for i in main.connections:
main.connections[i].send(data)
return
def incorrectUsage(addr, mode):
if mode == None:
sendFailure(addr, "Incorrect usage")
return
if mode in main.help.keys():
sendFailure(addr, "Usage: " + main.help[mode])
return