From 9187a3a8e7260125acc72e9fd8b36cd96daf7c83 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Mon, 3 Dec 2007 22:03:32 +0000 Subject: New Auth Framework: trap user editing exceptions --- lib/rbot/core/auth.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') 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) -- cgit v1.2.3