]> git.donarmstrong.com Git - infobot.git/commitdiff
<action>
authortimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Fri, 6 Jan 2006 06:18:38 +0000 (06:18 +0000)
committertimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Fri, 6 Jan 2006 06:18:38 +0000 (06:18 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@1248 c11ca15a-4712-0410-83d8-924469b57eb5

src/Modules/OnJoin.pl

index 5b3fbf6a6e47897d63c749c720754135b629b74c..60ca2d0a1f2a3b37f0451f48c7366cff7257402e 100644 (file)
@@ -1,7 +1,7 @@
 #
 # OnJoin.pl: emit a message when a user enters the channel
 #    Author: Corey Edwards <tensai@zmonkey.org>
-#   Version: v0.2.1
+#   Version: v0.2.2
 #   Created: 20051222
 #   Updated: 20060105
 
@@ -24,8 +24,16 @@ sub onjoin {
 
        # print the message, if there was one
        if ($message){
-               &status("OnJoin: $nick arrived, printing message");
-               &msg($chan, $message);
+               $message = substVars($message);
+               if ($message =~ m/^<action>\s*(.*)/){
+                       &status("OnJoin: $nick arrived, performing action");
+                       &action($chan, $1);
+               }
+               else{
+                       $message =~ s/^<reply>\s*//;
+                       &status("OnJoin: $nick arrived, printing message");
+                       &msg($chan, $message);
+               }
        }
 
        return;