1
0
Fork 0
forked from swee/MeowNex

Prepare for contribution #1

Merged
10kilo merged 30 commits from swee/MeowNex:main into main 2024-12-13 12:59:40 -08:00
Showing only changes of commit 369d6a042c - Show all commits

View file

@ -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: raise Exception("WorkInProgress!!!")
# com = ['sed',"" + command[1] + ""] except:
# print(command[1]) print(traceback.format_exc())
# texte = open("log-text-"+channel).read().split("\n") else:
# texte.reverse() irc.send_irc(channel, nick + ": What to correct?")
# texte.pop(0)
# 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":