mirror of
https://github.com/RussellChamp/tilde-projects.git
synced 2026-10-28 00:22:34 +00:00
fix ping, systemd example
This commit is contained in:
1 parent
9247e2f2e2
commit
464299a6af
2 files changed
+21
-6
No files matched your search
@@ -36,8 +36,8 @@ JACKPOT_FILE = "tildejackpot.txt"
|
||||
JACKPOT_MIN = 3
|
||||
DEBUG = False
|
||||
|
||||
def ping():
|
||||
ircsock.send("PONG :pingis\n")
|
||||
def ping(pong):
|
||||
ircsock.send("PONG {}\n".format(pong))
|
||||
|
||||
def sendmsg(chan , msg):
|
||||
ircsock.send("PRIVMSG "+ chan +" :"+ msg +"\n")
|
||||
@@ -181,8 +181,8 @@ def listen():
|
||||
for msg in ircmsg.split('\n'):
|
||||
msg = msg.strip('\n\r')
|
||||
|
||||
if msg.find("PING :") != -1:
|
||||
ping()
|
||||
if msg[:4] == "PING":
|
||||
ping(msg.split(" ")[1])
|
||||
|
||||
formatted = formatter.format_message(msg)
|
||||
|
||||
@@ -213,8 +213,8 @@ def listen():
|
||||
if msg.find(":!rollcall") != -1:
|
||||
rollcall(channel)
|
||||
|
||||
if msg.find("PING :") != -1:
|
||||
ping()
|
||||
if msg[:4] == "PING":
|
||||
ping(msg.split(" ")[1])
|
||||
|
||||
sys.stdout.flush()
|
||||
time.sleep(1)
|
||||
|
||||
Reference in new issue
Block a user