From 64855ede3b0881ef915d20455aaf00b4e3509a3e Mon Sep 17 00:00:00 2001 From: Thomas Coppi Date: Fri, 27 Apr 2007 20:57:59 -0600 Subject: [PATCH] Reply when privmsged with the cmd prefix --- scrappy.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scrappy.py b/scrappy.py index f221374..531f447 100755 --- a/scrappy.py +++ b/scrappy.py @@ -93,16 +93,20 @@ class scrappy: if arg[0] == self.cmdchar: cmd = arg[1:] - print cmd; #dispatch the command def on_privmsg(self, c, event): cmd = event.arguments()[0] + nick = irclib_scrappy.nm_to_n(event.source()) user = irclib_scrappy.nm_to_u(event.source()) host = irclib_scrappy.nm_to_h(event.source()) + if cmd[0] == self.cmdchar: + c.privmsg(nick,"You privmsged me, you don't need to " + + "prefix commands with %s" % self.cmdchar) + #dispatch the command def on_disconnect(self, c, event): -- 2.11.4.GIT