patch for multiline perms
This commit is contained in:
parent
e23c9d31af
commit
d67a44fa6b
1 changed files with 29 additions and 23 deletions
50
sweebot.py
50
sweebot.py
|
@ -414,31 +414,40 @@ while True:
|
|||
irc.send_irc(channel, "This is SweeBot " + __version__)
|
||||
|
||||
elif command[0] == "$figlet":
|
||||
if len(command) > 1:
|
||||
try:
|
||||
system(['figlet'] + command[1:], channel)
|
||||
except Exception as ex:
|
||||
irc.send_irc(channel, nick + ": " + ex.__class__.__name__)
|
||||
if not sbconfig.cflagexist(channel, "-multiline"):
|
||||
if len(command) > 1:
|
||||
try:
|
||||
system(['figlet'] + command[1:], channel)
|
||||
except Exception as ex:
|
||||
irc.send_irc(channel, nick + ": " + ex.__class__.__name__)
|
||||
else:
|
||||
irc.send_irc(channel, nick + ": What text should I enlarge?")
|
||||
else:
|
||||
irc.send_irc(channel, nick + ": What text should I enlarge?")
|
||||
multiline("Multiline commands are disabled in this channel.", channel)
|
||||
|
||||
elif command[0] == "$tdfiglet":
|
||||
if len(command) > 1:
|
||||
try:
|
||||
system(['tdfiglet', '-cm', "-r"] + command[1:], channel)
|
||||
except Exception as ex:
|
||||
irc.send_irc(channel, nick + ": " + ex.__class__.__name__)
|
||||
if not sbconfig.cflagexist(channel, "-multiline"):
|
||||
if len(command) > 1:
|
||||
try:
|
||||
system(['tdfiglet', '-cm', "-r"] + command[1:], channel)
|
||||
except Exception as ex:
|
||||
irc.send_irc(channel, nick + ": " + ex.__class__.__name__)
|
||||
else:
|
||||
irc.send_irc(channel, nick + ": What text should I enlarge?")
|
||||
else:
|
||||
irc.send_irc(channel, nick + ": What text should I enlarge?")
|
||||
multiline("Multiline commands are disabled in this channel.", channel)
|
||||
|
||||
elif command[0] == "$cowsay":
|
||||
if len(command) > 1:
|
||||
try:
|
||||
system(['cowsay'] + command[1:], channel)
|
||||
except Exception as ex:
|
||||
irc.send_irc(channel, nick + ": " + ex.__class__.__name__)
|
||||
if not sbconfig.cflagexist(channel, "-multiline"):
|
||||
if len(command) > 1:
|
||||
try:
|
||||
system(['cowsay'] + command[1:], channel)
|
||||
except Exception as ex:
|
||||
irc.send_irc(channel, nick + ": " + ex.__class__.__name__)
|
||||
else:
|
||||
irc.send_irc(channel, nick + ": What should the cow say?")
|
||||
else:
|
||||
irc.send_irc(channel, nick + ": What should the cow say?")
|
||||
multiline("Multiline commands are disabled in this channel.", channel)
|
||||
|
||||
elif command[0] == "$uptime":
|
||||
try:
|
||||
|
@ -533,9 +542,6 @@ while True:
|
|||
except ex:
|
||||
multiline(str(ex), channel)
|
||||
|
||||
|
||||
|
||||
|
||||
else:
|
||||
if command[0][:3] == "$.." or command[0][:2] == "$/":
|
||||
irc.send_irc(channel, nick + ": Nice try.")
|
||||
|
@ -596,7 +602,7 @@ while True:
|
|||
print(traceback.format_exc())
|
||||
elif "JOIN" in text and "#nixsanctuary" in text:
|
||||
nick = text.split(":")[1].split("!")[0]
|
||||
if not "swee" in nick:
|
||||
if not "swe" in nick:
|
||||
irc.send_irc("##hiya", "hiya: " + nick + " has joined #nixsanctuary")
|
||||
pass
|
||||
|
||||
|
|
Loading…
Reference in a new issue