Compare commits
3 Commits
7dc97123be
...
0eb571efa2
Author | SHA1 | Date | |
---|---|---|---|
0eb571efa2 | |||
13815e4264 | |||
86933f1954 |
|
@ -6,7 +6,7 @@ All static data came from https://github.com/WFCD/warframe-worldstate-data
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
Python 3.6+
|
Python 3.6+
|
||||||
Python packages: `twisted service_identity requests`
|
Python packages: `twisted pyOpenSSL service_identity requests`
|
||||||
|
|
||||||
## Config
|
## Config
|
||||||
`server` - Server address.
|
`server` - Server address.
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
||||||
{"MT_EXCAVATE": {"value": "Excavation"}, "MT_SABOTAGE": {"value": "Sabotage"}, "MT_MOBILE_DEFENSE": {"value": "Mobile Defense"}, "MT_ASSASSINATION": {"value": "Assassination"}, "MT_EXTERMINATION": {"value": "Extermination"}, "MT_HIVE": {"value": "Hive"}, "MT_DEFENSE": {"value": "Defense"}, "MT_TERRITORY": {"value": "Interception"}, "MT_ARENA": {"value": "Rathuum"}, "MT_PVP": {"value": "Conclave"}, "MT_RESCUE": {"value": "Rescue"}, "MT_INTEL": {"value": "Spy"}, "MT_SURVIVAL": {"value": "Survival"}, "MT_CAPTURE": {"value": "Capture"}, "MT_SECTOR": {"value": "Dark Sector"}, "MT_RETRIEVAL": {"value": "Hijack"}, "MT_ASSAULT": {"value": "Assault"}, "MT_EVACUATION": {"value": "Defection"}, "MT_LANDSCAPE": {"value": "Free Roam"}}
|
{"MT_ARENA": {"value": "Rathuum"}, "MT_ARTIFACT": {"value": "Disruption"}, "MT_ASSAULT": {"value": "Assault"}, "MT_ASSASSINATION": {"value": "Assassination"}, "MT_CAPTURE": {"value": "Capture"}, "MT_DEFENSE": {"value": "Defense"}, "MT_DISRUPTION": {"value": "Disruption"}, "MT_EVACUATION": {"value": "Defection"}, "MT_EXCAVATE": {"value": "Excavation"}, "MT_EXTERMINATION": {"value": "Extermination"}, "MT_HIVE": {"value": "Hive"}, "MT_INTEL": {"value": "Spy"}, "MT_LANDSCAPE": {"value": "Free Roam"}, "MT_MOBILE_DEFENSE": {"value": "Mobile Defense"}, "MT_PVP": {"value": "Conclave"}, "MT_RESCUE": {"value": "Rescue"}, "MT_RETRIEVAL": {"value": "Hijack"}, "MT_SABOTAGE": {"value": "Sabotage"}, "MT_SECTOR": {"value": "Dark Sector"}, "MT_SURVIVAL": {"value": "Survival"}, "MT_TERRITORY": {"value": "Interception"}}
|
File diff suppressed because one or more lines are too long
13
warbot.py
13
warbot.py
|
@ -11,7 +11,7 @@ import threading
|
||||||
import configparser
|
import configparser
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from twisted.internet import protocol, reactor
|
from twisted.internet import ssl, protocol, reactor
|
||||||
from twisted.words.protocols import irc
|
from twisted.words.protocols import irc
|
||||||
|
|
||||||
URI = "http://content.warframe.com/dynamic/worldState.php"
|
URI = "http://content.warframe.com/dynamic/worldState.php"
|
||||||
|
@ -158,6 +158,11 @@ class WarBot(irc.IRCClient):
|
||||||
Called when the bot receives a PRIVMSG, which can come from channels
|
Called when the bot receives a PRIVMSG, which can come from channels
|
||||||
or users alike.
|
or users alike.
|
||||||
"""
|
"""
|
||||||
|
if message == ".help":
|
||||||
|
cmds = [".help", ".alerts", ".subscribe", ".unsubscribe",
|
||||||
|
".update_data", ".cetus"]
|
||||||
|
cmds.sort()
|
||||||
|
self.msg(channel, ", ".join(cmds))
|
||||||
if message == ".alerts":
|
if message == ".alerts":
|
||||||
self.alert_ids = []
|
self.alert_ids = []
|
||||||
self.checkNewAlerts(channel)
|
self.checkNewAlerts(channel)
|
||||||
|
@ -288,6 +293,10 @@ if __name__ == "__main__":
|
||||||
server = config["server"]
|
server = config["server"]
|
||||||
port = config.getint("port")
|
port = config.getint("port")
|
||||||
print("Connecting to:", server)
|
print("Connecting to:", server)
|
||||||
reactor.connectTCP(server, port, WarBotFactory(config))
|
reactor.connectSSL(
|
||||||
|
server,
|
||||||
|
port,
|
||||||
|
WarBotFactory(config),
|
||||||
|
ssl.ClientContextFactory())
|
||||||
reactor.addSystemEventTrigger('before','shutdown', stop.set)
|
reactor.addSystemEventTrigger('before','shutdown', stop.set)
|
||||||
reactor.run()
|
reactor.run()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user