forked from swee/MeowNex
Update sweebot.py
This commit is contained in:
parent
85730a0d23
commit
369d6a042c
1 changed files with 12 additions and 41 deletions
53
sweebot.py
53
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 subprocess
|
||||
from time import sleep, time, ctime
|
||||
|
@ -223,6 +223,7 @@ baps = ["T-T", "Ow!", "Beep!"]
|
|||
pats = ["-w-", "Meep...", "Prr!"]
|
||||
meows_happy = ['Meow!', 'Nyaa~', 'Mrow.', 'Prr! :3', "Mrrp?", "Mreow.", "!woeM", "3: !rrP", "~aayN", "Mew!", "Moew!"]
|
||||
meows_upset = ['Hiss!', "!ssiH", "Grrr..."]
|
||||
my_self = ["MeowNexUS", "MeowNexU5", "MeowN3xUS"]
|
||||
happiness = 5
|
||||
global times
|
||||
times = 0
|
||||
|
@ -318,7 +319,7 @@ while True:
|
|||
pass
|
||||
try:
|
||||
#if True:
|
||||
if "PRIVMSG" in text:
|
||||
if "PRIVMSG" in text and not nick in my_self:
|
||||
if "PRIVMSG" in text and command[0][0] == "$":
|
||||
run+=1
|
||||
update()
|
||||
|
@ -561,45 +562,15 @@ while True:
|
|||
multiline(f"\x01ACTION gives a hug to {name}\x01", channel)
|
||||
|
||||
|
||||
|
||||
#elif command[0] == "$sed":
|
||||
# if len(command) > 1:
|
||||
#try:
|
||||
# if True:
|
||||
# com = ['sed',"" + command[1] + ""]
|
||||
# print(command[1])
|
||||
# texte = open("log-text-"+channel).read().split("\n")
|
||||
# texte.reverse()
|
||||
# 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] == "$sed":
|
||||
if len(command) > 1:
|
||||
try:
|
||||
#if True:
|
||||
raise Exception("WorkInProgress!!!")
|
||||
except:
|
||||
print(traceback.format_exc())
|
||||
else:
|
||||
irc.send_irc(channel, nick + ": What to correct?")
|
||||
|
||||
|
||||
elif command[0] == "$config":
|
||||
|
|
Loading…
Reference in a new issue