Пример #1
0
def join(argument,gui):
            success = 0
            if (" " in argument[1]):
                argumentString2 = MiscUtils.messageSplit(argument[1])
                if MiscUtils.noDuplicate(gui.windowList,argumentString2[0]):
                   success = 1
                arguments = 2
            else:
                if MiscUtils.noDuplicate(gui.windowList,argument[1]):
                    success = 1
                arguments = 1
            if success == 1:
                if (arguments == 2):
                    msg_temp = argument[0] + " " + argument[0]+ " " + argument[1]+'\n'
                       
                else:
                    msg_temp = argument[1] + " " + argument[0]+ " " + argument[1]+'\n'    
                sendToServer(gui,msg_temp)
            else:
                TabUtils.writeMessage(gui,"You are already a member of that room!")
                gui.message.delete(0,END)
Пример #2
0
def leave(argument,gui):
        if argument[1] == "global":
            TabUtils.writeMessage("You cannot leave global!")
            gui.message.delete(0,END)
        else:
            if(not MiscUtils.noDuplicate(gui.windowList,argument[1])):
                TabUtils.deleteTab(gui,argument[1])
                gui.windowList.pop(argument[1],None)
                gui.menues.updateRoomList(gui.windowList)
                msg_temp ="global" + " " + argument[0] + " " +argument[1] +'\n'
                sendToServer(gui,msg_temp)
            else:
                gui.writeMessage("You are not a member of the room " + argument[1] +"!")
                gui.message.delete(0,END)
Пример #3
0
def invited(gui,arguments):
        if(MiscUtils.noDuplicate(gui.windowList,arguments)):
                TabUtils.addTab(gui,arguments)