]> git.donarmstrong.com Git - infobot.git/commitdiff
upper/lower case
authortimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Sat, 21 Jan 2006 06:22:12 +0000 (06:22 +0000)
committertimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Sat, 21 Jan 2006 06:22:12 +0000 (06:22 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@1266 c11ca15a-4712-0410-83d8-924469b57eb5

files/blootbot.help
files/sample/blootbot.chan
src/CommandStubs.pl
src/Modules/case.pl [new file with mode: 0644]

index ae2e25d7b9dae345b357c48cc190fd317cbb9ed6..5c00aa637204dae9eec37938a25a6ae08dfe564a 100644 (file)
@@ -247,6 +247,10 @@ lart: U: ## [#chan] <who>
 lart: E: ## lenzo infobot's bugginess
 lart: E: ## #perl everyone perl \=\= lamerville
 
+lc: D: lower case a given string
+lc: U: ## <string>
+lc: E: ## When will blootbot achieve world domination?
+
 listauth: D: Search the factoid extension db by creator
 listauth: U: ## <search>
 listauth: E: ## xk
@@ -428,6 +432,10 @@ topic: NOTE: #chan arg is only required if command is sent over private message
 topic: NOTE: commands can be preceeded? with '-' in order not to enforce changes to topic.
 topic: End of help.
 
+uc: D: upper case a given string
+uc: U: ## <string>
+uc: E: ## When will blootbot achieve world domination?
+
 unforget: If a factoid has been forgotten, "unforget x" will cause me to unerase it.
 
 unlobotomy: Not possible in real life, an unlobotomy will bring me back to life in the case of a lobotomy.
index 993f1e5b73d444e90270ef8807b2dafc6312e7c3..b0fe8b6dd8e135805c9fcafc6b43671cb4a0b03c 100644 (file)
@@ -1,4 +1,4 @@
-#v1: blootbot -- InfoBot -- written Sat Jan  7 05:46:31 2006
+#v1: blootbot -- infobot -- written Sat Jan 21 06:17:24 2006
 
 #botpark
     -OnJoin
@@ -47,6 +47,7 @@ _default
     +allowTelling
     +babelfish
     +botmail
+    +case
     +cookie
     +countdown
     debianRefreshInterval 7
index 0ad1430dea2c075581d33d90bd4326201e4d3e53..00e1ebab8a99aa879832cb1f75762d6e7ed919d3 100644 (file)
@@ -877,6 +877,7 @@ sub nullski {
 &addCmdHook('karma', ('CODEREF' => 'karma', ) );
 &addCmdHook('kernel', ('CODEREF' => 'Kernel::Kernel', 'Forker' => 1, 'Identifier' => 'Kernel', 'Cmdstats' => 'Kernel', 'NoArgs' => 1) );
 &addCmdHook('lart', ('CODEREF' => 'lart', 'Identifier' => 'lart', 'Help' => 'lart') );
+&addCmdHook('lc', ('CODEREF' => 'case::lower', 'Identifier' => 'case', 'Cmdstats' => 'case', 'Forker' => 1, 'Module' => 'case') );
 &addCmdHook('listauth', ('CODEREF' => 'CmdListAuth', 'Identifier' => 'Search', Module => 'Factoids', 'Help' => 'listauth') );
 &addCmdHook('md5(sum)?', ('CODEREF' => 'md5::md5', 'Identifier' => 'md5', 'Cmdstats' => 'md5', 'Forker' => 1, 'Module' => 'md5') );
 &addCmdHook('metar', ('CODEREF' => 'Weather::Metar', 'Identifier' => 'Weather', 'Help' => 'weather', 'Cmdstats' => 'Weather', 'Forker' => 1) );
@@ -896,6 +897,7 @@ sub nullski {
 &addCmdHook('seen', ('CODEREF' => 'seen', 'Identifier' => 'seen') );
 &addCmdHook('slashdot', ('CODEREF' => 'Slashdot::Slashdot', 'Identifier' => 'slashdot', 'Forker' => 1, 'Cmdstats' => 'slashdot') );
 &addCmdHook('tell|explain', ('CODEREF' => 'tell', Help => 'tell', Identifier => 'allowTelling', Cmdstats => 'Tell') );
+&addCmdHook('uc', ('CODEREF' => 'case::upper', 'Identifier' => 'case', 'Cmdstats' => 'case', 'Forker' => 1, 'Module' => 'case') );
 &addCmdHook('Uptime', ('CODEREF' => 'uptime', 'Identifier' => 'Uptime', 'Cmdstats' => 'Uptime') );
 &addCmdHook('u(ser)?info', ('CODEREF' => 'userinfo', 'Identifier' => 'UserInfo', 'Help' => 'userinfo', 'Module' => 'UserInfo') );
 &addCmdHook('verstats', ('CODEREF' => 'do_verstats' ) );
diff --git a/src/Modules/case.pl b/src/Modules/case.pl
new file mode 100644 (file)
index 0000000..c41937c
--- /dev/null
@@ -0,0 +1,20 @@
+#      case.pl: upper/lower a string
+#       Author: Tim Riker
+#    Licensing: Artistic License
+#      Version: v0.1
+#
+use strict;
+
+package case;
+
+sub upper {
+    my($message) = @_;
+    &::performStrictReply(uc $message);
+}
+
+sub lower {
+    my($message) = @_;
+    &::performStrictReply(lc $message);
+}
+
+1;