forked from swee/MeowNex
Prepare for contribution #1
1 changed files with 12 additions and 41 deletions
51
sweebot.py
51
sweebot.py
|
@ -1,4 +1,4 @@
|
||||||
__version__ = "0.0.2 Funni update"
|
__version__ = "0.0.2 Funni update" + ". https://git.swee.codes/MeowNex"
|
||||||
import socket
|
import socket
|
||||||
import subprocess
|
import subprocess
|
||||||
from time import sleep, time, ctime
|
from time import sleep, time, ctime
|
||||||
|
@ -223,6 +223,7 @@ baps = ["T-T", "Ow!", "Beep!"]
|
||||||
pats = ["-w-", "Meep...", "Prr!"]
|
pats = ["-w-", "Meep...", "Prr!"]
|
||||||
meows_happy = ['Meow!', 'Nyaa~', 'Mrow.', 'Prr! :3', "Mrrp?", "Mreow.", "!woeM", "3: !rrP", "~aayN", "Mew!", "Moew!"]
|
meows_happy = ['Meow!', 'Nyaa~', 'Mrow.', 'Prr! :3', "Mrrp?", "Mreow.", "!woeM", "3: !rrP", "~aayN", "Mew!", "Moew!"]
|
||||||
meows_upset = ['Hiss!', "!ssiH", "Grrr..."]
|
meows_upset = ['Hiss!', "!ssiH", "Grrr..."]
|
||||||
|
my_self = ["MeowNexUS", "MeowNexU5", "MeowN3xUS"]
|
||||||
happiness = 5
|
happiness = 5
|
||||||
global times
|
global times
|
||||||
times = 0
|
times = 0
|
||||||
|
@ -318,7 +319,7 @@ while True:
|
||||||
pass
|
pass
|
||||||
try:
|
try:
|
||||||
#if True:
|
#if True:
|
||||||
if "PRIVMSG" in text:
|
if "PRIVMSG" in text and not nick in my_self:
|
||||||
if "PRIVMSG" in text and command[0][0] == "$":
|
if "PRIVMSG" in text and command[0][0] == "$":
|
||||||
run+=1
|
run+=1
|
||||||
update()
|
update()
|
||||||
|
@ -561,45 +562,15 @@ while True:
|
||||||
multiline(f"\x01ACTION gives a hug to {name}\x01", channel)
|
multiline(f"\x01ACTION gives a hug to {name}\x01", channel)
|
||||||
|
|
||||||
|
|
||||||
|
elif command[0] == "$sed":
|
||||||
#elif command[0] == "$sed":
|
if len(command) > 1:
|
||||||
# if len(command) > 1:
|
try:
|
||||||
#try:
|
|
||||||
#if True:
|
#if True:
|
||||||
# com = ['sed',"" + command[1] + ""]
|
raise Exception("WorkInProgress!!!")
|
||||||
# print(command[1])
|
except:
|
||||||
# texte = open("log-text-"+channel).read().split("\n")
|
print(traceback.format_exc())
|
||||||
# texte.reverse()
|
else:
|
||||||
# texte.pop(0)
|
irc.send_irc(channel, nick + ": What to correct?")
|
||||||
# texte.pop(0)
|
|
||||||
# print(texte)
|
|
||||||
# texttoreplace = ""
|
|
||||||
# j = 0
|
|
||||||
# broken = False
|
|
||||||
# for i in texte:
|
|
||||||
# if command[1].split("/")[1] in i:
|
|
||||||
# texttoreplace = i
|
|
||||||
# broken = True
|
|
||||||
# break
|
|
||||||
# j+=1
|
|
||||||
# if not broken:
|
|
||||||
# irc.send_irc(channel, "Unable to correct: '" + command[1].split("/")[1] + "' not found in any chat message.")
|
|
||||||
# continue
|
|
||||||
# namee = open("log-name-"+channel).read().split("\n")
|
|
||||||
# namee.reverse()
|
|
||||||
# namee.pop(0)
|
|
||||||
# namee.pop(0)
|
|
||||||
# namee = namee[j]
|
|
||||||
# open("temp","w").write(texttoreplace)
|
|
||||||
# com.append("temp")
|
|
||||||
# print(com)
|
|
||||||
# result = subprocess.run(com, stdout=subprocess.PIPE)
|
|
||||||
# output = result.stdout.decode('utf-8').split("\n")
|
|
||||||
# irc.send_irc(channel, "Correction using sed: <" + namee + "> " + output[0])
|
|
||||||
# #except Exception as ex:
|
|
||||||
# #irc.send_irc(channel, nick + ": " + ex.__class__.__name__)
|
|
||||||
# else:
|
|
||||||
# irc.send_irc(channel, nick + ": What to correct?")
|
|
||||||
|
|
||||||
|
|
||||||
elif command[0] == "$config":
|
elif command[0] == "$config":
|
||||||
|
|
Loading…
Reference in a new issue