|
|
|
@ -20,18 +20,18 @@ HOST = "telnet.goldenunicorn.net" |
|
|
|
#usr_2 = "im bait" |
|
|
|
#pwrd_2 = "gupass" |
|
|
|
|
|
|
|
#usr_1 = "Mtron" |
|
|
|
#pwrd_1 = "gupass" |
|
|
|
|
|
|
|
#usr_2 = "IonJunkies-Merc" |
|
|
|
#pwrd_2 = "gupass" |
|
|
|
|
|
|
|
usr_1 = "doctor" |
|
|
|
usr_1 = "Mtron" |
|
|
|
pwrd_1 = "gupass" |
|
|
|
|
|
|
|
usr_2 = "robin-hood" |
|
|
|
usr_2 = "IonJunkies-Merc" |
|
|
|
pwrd_2 = "gupass" |
|
|
|
|
|
|
|
#usr_1 = "doctor" |
|
|
|
#pwrd_1 = "gupass" |
|
|
|
|
|
|
|
#usr_2 = "robin-hood" |
|
|
|
#pwrd_2 = "gupass" |
|
|
|
|
|
|
|
#this is a thing that i wrote |
|
|
|
#static lists |
|
|
|
convert_list = ["Ion-Pack","Ion-Decay","Cheese","Nuclear-thong","Skull","Bottle-Cap","Cigarette-Butt","Knife","Gas-Grenade","Leather-Vest","Buckler","Bola","Bug-Plate", |
|
|
|
@ -76,7 +76,7 @@ opposite_dir = { |
|
|
|
class mutant(QWidget): |
|
|
|
command_str = pyqtSignal(str) |
|
|
|
mqtt_str = pyqtSignal(str) |
|
|
|
|
|
|
|
mqtt_str_quiet = pyqtSignal(str,str) |
|
|
|
def __init__(self,user,password): |
|
|
|
QWidget.__init__(self) |
|
|
|
#file related |
|
|
|
@ -1142,7 +1142,7 @@ class mutant(QWidget): |
|
|
|
if result == "Make your selection (G,T,F,M,S,? for help, or X to exit): ": |
|
|
|
self.command_str.emit("G\r\n") |
|
|
|
self.mqtt_str.emit(self.user+" is online") |
|
|
|
|
|
|
|
self.mqtt_str_quiet.emit(self.user,"is online") |
|
|
|
if result == "help, or X to exit): ": |
|
|
|
self.command_str.emit("C\r\n") |
|
|
|
|
|
|
|
@ -1237,6 +1237,8 @@ class MainWindow(QMainWindow): |
|
|
|
mutbox.addWidget(self.m2) |
|
|
|
self.m1.mqtt_str.connect(self.send_mqtt) |
|
|
|
self.m2.mqtt_str.connect(self.send_mqtt) |
|
|
|
self.m1.mqtt_str_quiet.connect(self.send_mqtt_quiet) |
|
|
|
self.m2.mqtt_str_quiet.connect(self.send_mqtt_quiet) |
|
|
|
self.layout.addLayout(mutbox) |
|
|
|
self.button_group() |
|
|
|
self.createModeGroup() |
|
|
|
@ -1345,11 +1347,18 @@ class MainWindow(QMainWindow): |
|
|
|
self.client.username_pw_set("homeassistant", "oes5gohng9gau1Quei2ohpixashi4Thidoon1shohGai2mae0ru2zaph2vooshai") |
|
|
|
self.client.connect(broker_address) |
|
|
|
|
|
|
|
#Send mqtt |
|
|
|
#Send mqtt with talking |
|
|
|
def send_mqtt(self,out_str): |
|
|
|
self.setup_mqtt() |
|
|
|
if self.mq_check.isChecked(): |
|
|
|
self.client.publish("mutants", out_str) |
|
|
|
self.client.publish("mutants/talk", out_str) |
|
|
|
#Send mqtt with talking |
|
|
|
def send_mqtt_quiet(self,user,out_str): |
|
|
|
self.setup_mqtt() |
|
|
|
if self.mq_check.isChecked(): |
|
|
|
self.client.publish("mutants/stat/"+user, out_str) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__": |
|
|
|
App = QApplication(sys.argv) |
|
|
|
|