summaryrefslogtreecommitdiff
path: root/lib/Multi/IRC.pm
diff options
context:
space:
mode:
authoryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-07-28 10:49:31 +0000
committeryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-07-28 10:49:31 +0000
commita0f440de277653b3c79fd117d026855ec6b78373 (patch)
treea56cc85af2f1f46a705a7b5ecaaf40733a3aa992 /lib/Multi/IRC.pm
parentc9ff2f2cfaf328a8e8259dbc918d0bf56ddf646e (diff)
Two (rewritten - I love playing around with code) patches by applehq: added !list and !vndb commands to Multi::IRC
git-svn-id: svn://vndb.org/vndb@73 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
Diffstat (limited to 'lib/Multi/IRC.pm')
-rw-r--r--lib/Multi/IRC.pm13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/Multi/IRC.pm b/lib/Multi/IRC.pm
index 690c0ce0..d5f2d015 100644
--- a/lib/Multi/IRC.pm
+++ b/lib/Multi/IRC.pm
@@ -110,10 +110,15 @@ sub irccmd { # dest, cmd, [nick], [prep]
$nick ||= $_[ARG0];
$prep ||= '';
- if($cmd =~ /^info/) {
- return $_[KERNEL]->post(circ => privmsg => $dest,
- 'Hello, I am HMX-12 Multi v'.$VNDB::VERSION.' made by the great Yorhel!');
- }
+ return $_[KERNEL]->post(circ => privmsg => $dest,
+ 'Hello, I am HMX-12 Multi v'.$VNDB::VERSION.' made by the great Yorhel!')
+ if $cmd =~ /^info/;
+ return $_[KERNEL]->post(circ => privmsg => $dest,
+ 'VNDB ~ The Visual Novel Database ~ http://vndb.org/')
+ if $cmd =~ /^vndb/;
+ return $_[KERNEL]->post(circ => privmsg => $dest,
+ $prep.'this is not a warez channel!')
+ if $cmd =~ /^list/ && $dest eq $_[HEAP]{o}{channel}[0];
return if $cmd !~ /^(?:say|me|cmd|eval) /;