mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +01:00
Made supybot report SyntaxError to the user.
This commit is contained in:
parent
edf695aaad
commit
137f05b2e8
@ -374,9 +374,9 @@ class Privmsg(irclib.IrcCallback):
|
|||||||
s = addressed(irc.nick, msg)
|
s = addressed(irc.nick, msg)
|
||||||
try:
|
try:
|
||||||
args = tokenize(s)
|
args = tokenize(s)
|
||||||
|
self.Proxy(irc, msg, args)
|
||||||
except SyntaxError, e:
|
except SyntaxError, e:
|
||||||
irc.queueMsg(reply(msg, debug.exnToString(e)))
|
irc.queueMsg(reply(msg, debug.exnToString(e)))
|
||||||
self.Proxy(irc, msg, args)
|
|
||||||
|
|
||||||
def isCommand(self, methodName):
|
def isCommand(self, methodName):
|
||||||
# This function is ugly, but I don't want users to call methods like
|
# This function is ugly, but I don't want users to call methods like
|
||||||
@ -419,8 +419,11 @@ class Privmsg(irclib.IrcCallback):
|
|||||||
self.rateLimiter.put(msg)
|
self.rateLimiter.put(msg)
|
||||||
msg = self.rateLimiter.get()
|
msg = self.rateLimiter.get()
|
||||||
if msg:
|
if msg:
|
||||||
args = tokenize(s)
|
try:
|
||||||
self.Proxy(irc, msg, args)
|
args = tokenize(s)
|
||||||
|
self.Proxy(irc, msg, args)
|
||||||
|
except SyntaxError, e:
|
||||||
|
irc.queueMsg(reply(msg, debug.exnToString(e)))
|
||||||
|
|
||||||
|
|
||||||
class IrcObjectProxyRegexp:
|
class IrcObjectProxyRegexp:
|
||||||
|
Loading…
Reference in New Issue
Block a user