new pipebot things
parent
b26490f108
commit
43101d8063
@ -1 +1,3 @@
|
||||
venv/
|
||||
*.fifo
|
||||
__pycache__
|
||||
|
@ -0,0 +1,4 @@
|
||||
import sys
|
||||
|
||||
for line in sys.stdin:
|
||||
print (line)
|
@ -0,0 +1,7 @@
|
||||
import sys
|
||||
|
||||
for line in sys.stdin:
|
||||
print (line, file=sys.stderr)
|
||||
time, handle, message = line.split(" ", 2)
|
||||
message = message.rstrip()
|
||||
print (f"At {time}, {handle} said: {message}")
|
@ -0,0 +1,10 @@
|
||||
import sys
|
||||
|
||||
for line in sys.stdin:
|
||||
print (line, file=sys.stderr)
|
||||
time, handle, msg = line.split(" ", 2)
|
||||
if "bot" in msg:
|
||||
words = msg.split()
|
||||
words.reverse()
|
||||
msg = " ".join(words)
|
||||
print (msg)
|
Loading…
Reference in New Issue