diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-12-03 22:03:32 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-12-03 22:03:32 +0000 |
commit | 9187a3a8e7260125acc72e9fd8b36cd96daf7c83 (patch) | |
tree | 3de40ba6f4a01412947fd21efb237e39f66bbbb3 /lib/rbot | |
parent | 849fa917b05c28e98bc7bc678879c55ed1a95969 (diff) |
New Auth Framework: trap user editing exceptions
Diffstat (limited to 'lib/rbot')
-rw-r--r-- | lib/rbot/core/auth.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/rbot/core/auth.rb b/lib/rbot/core/auth.rb index 71ec4fb9..907a8cee 100644 --- a/lib/rbot/core/auth.rb +++ b/lib/rbot/core/auth.rb @@ -357,6 +357,7 @@ class AuthModule < CoreBotModule can_reset = bools + can_set + can_addrm
can_show = can_reset + ["perms"]
+ begin
case cmd.to_sym
when :show
@@ -509,6 +510,9 @@ class AuthModule < CoreBotModule else
m.reply _("sorry, I don't know how to %{request}") % {:request => m.message}
end
+ rescue => e
+ m.reply _("couldn't %{cmd}: %{exception}") % {:cmd => cmd, :exception => e}
+ end
end
def auth_tell_password(m, params)
|