From a7232cda281776a1d01777c0f934b4c2af1d8bab Mon Sep 17 00:00:00 2001 From: timriker Date: Fri, 6 Jan 2006 06:18:38 +0000 Subject: [PATCH] git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@1248 c11ca15a-4712-0410-83d8-924469b57eb5 --- blootbot/src/Modules/OnJoin.pl | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/blootbot/src/Modules/OnJoin.pl b/blootbot/src/Modules/OnJoin.pl index 5b3fbf6..60ca2d0 100644 --- a/blootbot/src/Modules/OnJoin.pl +++ b/blootbot/src/Modules/OnJoin.pl @@ -1,7 +1,7 @@ # # OnJoin.pl: emit a message when a user enters the channel # Author: Corey Edwards -# 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/^\s*(.*)/){ + &status("OnJoin: $nick arrived, performing action"); + &action($chan, $1); + } + else{ + $message =~ s/^\s*//; + &status("OnJoin: $nick arrived, printing message"); + &msg($chan, $message); + } } return; -- 2.39.2