X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2FProcess.pl;h=3f3fa812b73c22aaf759aed8bebaaafd4bd25de9;hb=de9ba421b308e658a84413cd17ddaedf8fead5a1;hp=eeaf9d48cbd5465a03ee7eb75914b67282791934;hpb=a2b57b71fb77b1011a32ba79eafed7a868532685;p=infobot.git diff --git a/src/Process.pl b/src/Process.pl index eeaf9d4..3f3fa81 100644 --- a/src/Process.pl +++ b/src/Process.pl @@ -275,7 +275,7 @@ sub process { } # greetings. - if ( $message =~ /how (the hell )?are (ya|you)( doin\'?g?)?\?*$/ && $talkok ) { + if ( $message =~ /how (the he(ck|ll) )?are (ya|you)( doin\'?g?)?\?*$/ && $talkok ) { &performReply( &getRandom( keys %{ $lang{'howareyou'} } ) ); return; @@ -304,15 +304,19 @@ sub process { ### # karma. set... - if ( $msgType =~ /public/i - && $message =~ /^(\S+)(--|\+\+)\s*$/ + if ( $message =~ /^(\S+)(--|\+\+)\s*$/ && $addressed && &IsChanConfOrWarn('karma') ) { - # to request factoids such as 'g++' or 'libstdc++', append '?' to the query. + # for factoids such as 'g++' or 'libstdc++', append '?' to query. my ( $term, $inc ) = ( lc $1, $2 ); + if( !( $msgType =~ /public/i ) ) { + &msg( $who, "please use karma in a channel only"); + return; + } + if ( lc $term eq lc $who ) { &msg( $who, "please don't karma yourself" ); return;