3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-23 03:02:47 +01:00

Added "ago" module

This commit is contained in:
Pragmatic Software 2010-06-23 01:23:38 +00:00
parent a13d028e3e
commit 4d023df17d
3 changed files with 146 additions and 84 deletions

View File

@ -13,8 +13,8 @@ use warnings;
# These are set automatically by the build/commit script # These are set automatically by the build/commit script
use constant { use constant {
BUILD_NAME => "PBot", BUILD_NAME => "PBot",
BUILD_REVISION => 197, BUILD_REVISION => 198,
BUILD_DATE => "2010-06-21", BUILD_DATE => "2010-06-22",
}; };
1; 1;

View File

@ -14,10 +14,10 @@ type: text
action: /say This is a test in #pbot2! action: /say This is a test in #pbot2!
created_on: 1277000257.49081 created_on: 1277000257.49081
enabled: 1 enabled: 1
last_referenced_on: 1277133747.27277 last_referenced_on: 1277165616.24181
owner: pbot3 owner: pbot3
rate_limit: 0 rate_limit: 10
ref_count: 13 ref_count: 16
ref_user: pragma_ ref_user: pragma_
type: text type: text
@ -2136,9 +2136,10 @@ type: text
action: an integer constant expression, with type int and a negative value, that is returned by several functions to indicate end-of-file (ISO/IEC 9899:1999 7.19.1(3)). It is NOT a char. It is NOT a byte that is stored at the end of every file. action: an integer constant expression, with type int and a negative value, that is returned by several functions to indicate end-of-file (ISO/IEC 9899:1999 7.19.1(3)). It is NOT a char. It is NOT a byte that is stored at the end of every file.
created_on: 1104596552 created_on: 1104596552
enabled: 1 enabled: 1
last_referenced_on: 1277154619.75901
owner: infobahn owner: infobahn
rate_limit: 15 rate_limit: 15
ref_count: 33 ref_count: 34
ref_user: Wulf ref_user: Wulf
type: text type: text
@ -3086,10 +3087,11 @@ type: text
action: (carriage return) Moves the active position to the initial position of the current line. action: (carriage return) Moves the active position to the initial position of the current line.
created_on: 1244570284 created_on: 1244570284
enabled: 1 enabled: 1
last_referenced_on: 1277228153.1788
owner: Wulf_ owner: Wulf_
rate_limit: 15 rate_limit: 15
ref_count: 0 ref_count: 1
ref_user: nobody ref_user: Wulf
type: text type: text
<^> <^>
@ -3452,6 +3454,16 @@ ref_count: 0
ref_user: nobody ref_user: nobody
type: text type: text
<ago>
action: ago.pl
created_on: 1277256899.15762
enabled: 1
owner: pragma_
rate_limit: 15
ref_count: 0
ref_user: nobody
type: module
<aids> <aids>
action: "There's no easy way to say this. You got aids. Yuck! :x" $noaids $noaids $noaids "You contracted aids from $who_answers!" "You were attacked by a $animals! You now have aids." $noaids $noaids action: "There's no easy way to say this. You got aids. Yuck! :x" $noaids $noaids $noaids "You contracted aids from $who_answers!" "You were attacked by a $animals! You now have aids." $noaids $noaids
created_on: 1264285407 created_on: 1264285407
@ -3976,10 +3988,11 @@ type: text
action: /me points accusingly at $args, "Where is your book?!" action: /me points accusingly at $args, "Where is your book?!"
created_on: 1179504776 created_on: 1179504776
enabled: 1 enabled: 1
last_referenced_on: 1277150498.11992
owner: pragma_ owner: pragma_
rate_limit: 15 rate_limit: 15
ref_count: 765 ref_count: 767
ref_user: nak ref_user: zcram
type: text type: text
<book2> <book2>
@ -3996,10 +4009,11 @@ type: text
action: http://www.iso-9899.info/wiki/Books action: http://www.iso-9899.info/wiki/Books
created_on: 1104378101 created_on: 1104378101
enabled: 1 enabled: 1
last_referenced_on: 1277159744.56438
owner: twkm owner: twkm
rate_limit: 15 rate_limit: 15
ref_count: 464 ref_count: 465
ref_user: efaust ref_user: Dianora
type: text type: text
<booty(.*)> <booty(.*)>
@ -4096,9 +4110,10 @@ type: text
action: /say $bye_words, $nick action: /say $bye_words, $nick
created_on: 1109365229 created_on: 1109365229
enabled: 1 enabled: 1
last_referenced_on: 1277141935.10995
owner: pragma_ owner: pragma_
rate_limit: 15 rate_limit: 15
ref_count: 30 ref_count: 32
ref_user: megabraker ref_user: megabraker
type: text type: text
@ -4136,10 +4151,11 @@ type: text
action: /say C is a low level language designed to make assembly "easier", useful for device drivers or operating systems. Thusly, one has to maintain buffers, memory, and various low level information. C is not meant to be used for everyday applications, a common misconception. action: /say C is a low level language designed to make assembly "easier", useful for device drivers or operating systems. Thusly, one has to maintain buffers, memory, and various low level information. C is not meant to be used for everyday applications, a common misconception.
created_on: 1108006206 created_on: 1108006206
enabled: 1 enabled: 1
last_referenced_on: 1277141710.64259
owner: pragma owner: pragma
rate_limit: 15 rate_limit: 15
ref_count: 154 ref_count: 155
ref_user: rolfen ref_user: megabraker
type: text type: text
<c++> <c++>
@ -4336,10 +4352,11 @@ type: text
action: /call ideone $nick action: /call ideone $nick
created_on: 1272176634 created_on: 1272176634
enabled: 1 enabled: 1
last_referenced_on: 1277233638.86409
owner: pragma_ owner: pragma_
rate_limit: 15 rate_limit: 0
ref_count: 3312 ref_count: 3340
ref_user: Pinky ref_user: pizza_
type: text type: text
<cc2> <cc2>
@ -4356,10 +4373,11 @@ type: text
action: cdecl.pl action: cdecl.pl
created_on: 1191041914 created_on: 1191041914
enabled: 1 enabled: 1
last_referenced_on: 1277166699.34796
owner: pragma_ owner: pragma_
rate_limit: 15 rate_limit: 15
ref_count: 2490 ref_count: 2492
ref_user: kate` ref_user: Wulf
type: module type: module
<cfa> <cfa>
@ -4396,9 +4414,10 @@ type: text
action: http://code.google.com/p/pbot2-pl/source/list action: http://code.google.com/p/pbot2-pl/source/list
created_on: 1275818314 created_on: 1275818314
enabled: 1 enabled: 1
last_referenced_on: 1277165352.6388
owner: pragma_ owner: pragma_
rate_limit: 15 rate_limit: 15
ref_count: 4 ref_count: 5
ref_user: pragma_ ref_user: pragma_
type: text type: text
@ -4517,10 +4536,11 @@ type: module
action: red green yellow blue purple pink brown black white octarine cyan magenta orange action: red green yellow blue purple pink brown black white octarine cyan magenta orange
created_on: 1108931265 created_on: 1108931265
enabled: 1 enabled: 1
last_referenced_on: 1277141833.77794
owner: pragma_ owner: pragma_
rate_limit: 15 rate_limit: 15
ref_count: 5 ref_count: 7
ref_user: Irishmanluke ref_user: pragma_
type: text type: text
<combo-breaker> <combo-breaker>
@ -4597,10 +4617,11 @@ type: text
action: compliment action: compliment
created_on: 1255395343 created_on: 1255395343
enabled: 1 enabled: 1
last_referenced_on: 1277139842.73797
owner: pragma_ owner: pragma_
rate_limit: 15 rate_limit: 15
ref_count: 54 ref_count: 55
ref_user: pragma_ ref_user: dave0
type: module type: module
<const> <const>
@ -4727,10 +4748,11 @@ type: text
action: cstd.pl action: cstd.pl
created_on: 1270956236 created_on: 1270956236
enabled: 1 enabled: 1
last_referenced_on: 1277234055.46338
owner: pragma_ owner: pragma_
rate_limit: 15 rate_limit: 15
ref_count: 991 ref_count: 994
ref_user: Chris ref_user: ecrane
type: module type: module
<csv> <csv>
@ -4957,10 +4979,11 @@ type: text
action: dict.org.pl action: dict.org.pl
created_on: 1269777616 created_on: 1269777616
enabled: 1 enabled: 1
last_referenced_on: 1277246751.56819
owner: pragma_ owner: pragma_
rate_limit: 15 rate_limit: 15
ref_count: 410 ref_count: 413
ref_user: Wulf ref_user: pragma_
type: module type: module
<die> <die>
@ -5037,9 +5060,10 @@ type: text
action: /say "It doesn't work!" is not very informative for the people trying to help you. Please describe what you think may be wrong, what results you expected to get and what instead actually happens. Pasting a compilable test-case and/or compiler messages to http://codepad.org/ may be helpful. action: /say "It doesn't work!" is not very informative for the people trying to help you. Please describe what you think may be wrong, what results you expected to get and what instead actually happens. Pasting a compilable test-case and/or compiler messages to http://codepad.org/ may be helpful.
created_on: 1175456821 created_on: 1175456821
enabled: 1 enabled: 1
last_referenced_on: 1277148771.43879
owner: pragma_ owner: pragma_
rate_limit: 15 rate_limit: 15
ref_count: 137 ref_count: 138
ref_user: Wulf ref_user: Wulf
type: text type: text
@ -5087,10 +5111,11 @@ type: text
action: /say When taking input for type double you need to use lf format specifier in the scanf statement. But when you are outputting a double you use f format specifier in the printf statements. action: /say When taking input for type double you need to use lf format specifier in the scanf statement. But when you are outputting a double you use f format specifier in the printf statements.
created_on: 1195072541 created_on: 1195072541
enabled: 1 enabled: 1
last_referenced_on: 1277216617.71238
owner: pragma_ owner: pragma_
rate_limit: 15 rate_limit: 15
ref_count: 22 ref_count: 23
ref_user: pragma_ ref_user: Jafet
type: text type: text
<draft> <draft>
@ -5297,10 +5322,11 @@ type: text
action: excuse.sh action: excuse.sh
created_on: 1236819394 created_on: 1236819394
enabled: 1 enabled: 1
last_referenced_on: 1277137283.63803
owner: pragma_ owner: pragma_
rate_limit: 15 rate_limit: 15
ref_count: 276 ref_count: 278
ref_user: megabraker ref_user: pragma_
type: module type: module
<existence> <existence>
@ -5317,10 +5343,11 @@ type: text
action: /call cdecl explain action: /call cdecl explain
created_on: 1191042468 created_on: 1191042468
enabled: 1 enabled: 1
last_referenced_on: 1277166699.34623
owner: pragma_ owner: pragma_
rate_limit: 15 rate_limit: 15
ref_count: 2089 ref_count: 2092
ref_user: kate` ref_user: Wulf
type: text type: text
<f> <f>
@ -5597,9 +5624,10 @@ type: text
action: /say Function Pointer Tutorial: http://www.newty.de/fpt/fpt.html action: /say Function Pointer Tutorial: http://www.newty.de/fpt/fpt.html
created_on: 1189558928 created_on: 1189558928
enabled: 1 enabled: 1
last_referenced_on: 1277231237.97915
owner: OrngeTide owner: OrngeTide
rate_limit: 15 rate_limit: 15
ref_count: 5 ref_count: 6
ref_user: Wulf ref_user: Wulf
type: text type: text
@ -5697,20 +5725,22 @@ type: text
action: gdefine.pl action: gdefine.pl
created_on: 1236819675 created_on: 1236819675
enabled: 1 enabled: 1
last_referenced_on: 1277172774.33622
owner: pragma_ owner: pragma_
rate_limit: 15 rate_limit: 15
ref_count: 422 ref_count: 423
ref_user: Kaye ref_user: pragma_
type: module type: module
<gdict> <gdict>
action: /call gdefine action: /call gdefine
created_on: 1255125488 created_on: 1255125488
enabled: 1 enabled: 1
last_referenced_on: 1277172774.33372
owner: pragma_ owner: pragma_
rate_limit: 15 rate_limit: 15
ref_count: 327 ref_count: 328
ref_user: _root ref_user: pragma_
type: text type: text
<geekporn> <geekporn>
@ -5927,10 +5957,11 @@ type: text
action: /say "Given..Want": What do you have to work with? What's the desired goal? Between them is the resulting Process. Now ask yourself: WHY am I doing this? Why THIS way? action: /say "Given..Want": What do you have to work with? What's the desired goal? Between them is the resulting Process. Now ask yourself: WHY am I doing this? Why THIS way?
created_on: 1254241388 created_on: 1254241388
enabled: 1 enabled: 1
last_referenced_on: 1277149965.14601
owner: dbtid owner: dbtid
rate_limit: 15 rate_limit: 15
ref_count: 26 ref_count: 27
ref_user: PoppaVic ref_user: habnabit
type: text type: text
<h> <h>
@ -5997,10 +6028,11 @@ type: regex
action: /call hi action: /call hi
created_on: 1179679787 created_on: 1179679787
enabled: 1 enabled: 1
last_referenced_on: 1277141870.28097
owner: pragma_ owner: pragma_
rate_limit: 15 rate_limit: 15
ref_count: 77 ref_count: 78
ref_user: rolfen ref_user: megabraker
type: text type: text
<helloworld> <helloworld>
@ -6017,10 +6049,11 @@ type: text
action: /say To learn all about me, see http://www.iso-9899.info/wiki/Candide action: /say To learn all about me, see http://www.iso-9899.info/wiki/Candide
created_on: 1109792986 created_on: 1109792986
enabled: 1 enabled: 1
last_referenced_on: 1277141639.67316
owner: NeverDream owner: NeverDream
rate_limit: 15 rate_limit: 15
ref_count: 488 ref_count: 489
ref_user: dave0 ref_user: megabraker
type: text type: text
<herring> <herring>
@ -6037,11 +6070,11 @@ type: text
action: /say $hi_phrases, $nick action: /say $hi_phrases, $nick
created_on: 1109044278 created_on: 1109044278
enabled: 1 enabled: 1
last_referenced_on: 1277133673.344 last_referenced_on: 1277163209.95677
owner: pragma_ owner: pragma_
rate_limit: 15 rate_limit: 15
ref_count: 864 ref_count: 868
ref_user: pragma_ ref_user: angstrom
type: text type: text
<hi_phrases> <hi_phrases>
@ -6138,10 +6171,11 @@ type: text
action: /say $how_answers action: /say $how_answers
created_on: 1276845773 created_on: 1276845773
enabled: 1 enabled: 1
last_referenced_on: 1277141724.48669
owner: pragma_ owner: pragma_
rate_limit: 15 rate_limit: 15
ref_count: 5 ref_count: 8
ref_user: megabraker ref_user: pragma_
type: text type: text
<how_answers> <how_answers>
@ -6258,11 +6292,12 @@ type: text
action: ideone.pl action: ideone.pl
created_on: 1272176604 created_on: 1272176604
enabled: 1 enabled: 1
last_referenced_on: 1277233638.87527
modulelauncher_subpattern: s/([^ ]+)\s+(.*)/$1 '$2'/ modulelauncher_subpattern: s/([^ ]+)\s+(.*)/$1 '$2'/
owner: pragma_ owner: pragma_
rate_limit: 15 rate_limit: 15
ref_count: 3309 ref_count: 3335
ref_user: Pinky ref_user: pizza_
type: module type: module
<idiot> <idiot>
@ -6329,10 +6364,11 @@ type: text
action: insult.pl action: insult.pl
created_on: 1236819209 created_on: 1236819209
enabled: 1 enabled: 1
last_referenced_on: 1277256769.41503
owner: pragma_ owner: pragma_
rate_limit: 15 rate_limit: 15
ref_count: 378 ref_count: 380
ref_user: snhmib ref_user: pragma_
type: module type: module
<int> <int>
@ -6479,10 +6515,11 @@ type: text
action: /say K&R is The C Programming Language, 2nd edition, by Kernighan and Ritchie, http://cm.bell-labs.com/cm/cs/cbook/ - be sure to see the errata as well, at http://cm.bell-labs.com/cm/cs/cbook/2ediffs.html - Note that K&R is not designed to teach programming itself, but rather how C does programming. If you want to learn how to program, this isn't the book or programming language for you. action: /say K&R is The C Programming Language, 2nd edition, by Kernighan and Ritchie, http://cm.bell-labs.com/cm/cs/cbook/ - be sure to see the errata as well, at http://cm.bell-labs.com/cm/cs/cbook/2ediffs.html - Note that K&R is not designed to teach programming itself, but rather how C does programming. If you want to learn how to program, this isn't the book or programming language for you.
created_on: 1243951633 created_on: 1243951633
enabled: 1 enabled: 1
last_referenced_on: 1277161233.0631
owner: Chris owner: Chris
rate_limit: 15 rate_limit: 15
ref_count: 524 ref_count: 527
ref_user: rizlah ref_user: Ygnus
type: text type: text
<k&r2> <k&r2>
@ -6649,10 +6686,11 @@ type: text
action: /call double action: /call double
created_on: 1195072615 created_on: 1195072615
enabled: 1 enabled: 1
last_referenced_on: 1277216617.67801
owner: pragma_ owner: pragma_
rate_limit: 15 rate_limit: 15
ref_count: 3 ref_count: 4
ref_user: pragma_ ref_user: Jafet
type: text type: text
<libpack> <libpack>
@ -6819,10 +6857,11 @@ type: text
action: int main(int argc, char *argv[]); or int main(int argc, char **argv); or int main(void); See also ''argc'' and ''argv''; the standard entry point to C programs action: int main(int argc, char *argv[]); or int main(int argc, char **argv); or int main(void); See also ''argc'' and ''argv''; the standard entry point to C programs
created_on: 1104231974 created_on: 1104231974
enabled: 1 enabled: 1
last_referenced_on: 1277169228.22868
owner: twkm owner: twkm
rate_limit: 15 rate_limit: 15
ref_count: 76 ref_count: 78
ref_user: Jafet ref_user: kate`
type: text type: text
<mainloop_io> <mainloop_io>
@ -6869,10 +6908,11 @@ type: text
action: man.pl action: man.pl
created_on: 1107137901 created_on: 1107137901
enabled: 1 enabled: 1
last_referenced_on: 1277154047.1415
owner: pragma_ owner: pragma_
rate_limit: 15 rate_limit: 15
ref_count: 1016 ref_count: 1017
ref_user: pragma_ ref_user: efaust
type: module type: module
<manpage> <manpage>
@ -7479,10 +7519,11 @@ type: text
action: /say Paste code/errors to http://codepad.org action: /say Paste code/errors to http://codepad.org
created_on: 1247850332 created_on: 1247850332
enabled: 1 enabled: 1
last_referenced_on: 1277142614.17624
owner: PoppaVic owner: PoppaVic
rate_limit: 15 rate_limit: 15
ref_count: 58 ref_count: 59
ref_user: dave0 ref_user: xuser
type: text type: text
<pastebin> <pastebin>
@ -7779,10 +7820,11 @@ type: text
action: a function declaration that also includes types for the parameters. action: a function declaration that also includes types for the parameters.
created_on: 1105035288 created_on: 1105035288
enabled: 1 enabled: 1
last_referenced_on: 1277142106.61885
owner: twkm owner: twkm
rate_limit: 15 rate_limit: 15
ref_count: 9 ref_count: 10
ref_user: Soul_keeper ref_user: sepult
type: text type: text
<pth> <pth>
@ -9049,9 +9091,10 @@ type: text
action: /say $args is a $sizes $idiot! action: /say $args is a $sizes $idiot!
created_on: 1194256622 created_on: 1194256622
enabled: 1 enabled: 1
last_referenced_on: 1277141626.78617
owner: pragma_ owner: pragma_
rate_limit: 15 rate_limit: 15
ref_count: 42 ref_count: 43
ref_user: megabraker ref_user: megabraker
type: text type: text
@ -9179,10 +9222,11 @@ type: text
action: /say Testing in any channel ... action: /say Testing in any channel ...
created_on: 1272786662 created_on: 1272786662
enabled: 1 enabled: 1
last_referenced_on: 1277233976.52688
owner: arenics owner: arenics
rate_limit: 15 rate_limit: 15
ref_count: 19 ref_count: 20
ref_user: pbot3 ref_user: ecrane
type: text type: text
<test88> <test88>
@ -9330,7 +9374,7 @@ action: get_title.pl
created_on: 1258840021 created_on: 1258840021
enabled: 1 enabled: 1
owner: pragma_ owner: pragma_
rate_limit: 15 rate_limit: 0
ref_count: 32 ref_count: 32
ref_user: lolfrenz ref_user: lolfrenz
type: module type: module
@ -9826,10 +9870,11 @@ ref_user: pragma_
type: text type: text
<version> <version>
action: /say PBot revision 194 2010-06-21 action: /say PBot revision 195 2010-06-21
created_on: 1277133561.39062 created_on: 1277176857.09794
enabled: 1 enabled: 1
owner: pbot3 last_referenced_on: 1277163757.64518
owner: candide
rate_limit: 15 rate_limit: 15
ref_count: 0 ref_count: 0
ref_user: nobody ref_user: nobody
@ -9959,10 +10004,11 @@ type: text
action: /call wikipedia action: /call wikipedia
created_on: 1257554566 created_on: 1257554566
enabled: 1 enabled: 1
last_referenced_on: 1277172793.64606
owner: pragma_ owner: pragma_
rate_limit: 15 rate_limit: 15
ref_count: 382 ref_count: 383
ref_user: bearded_oneder ref_user: pragma_
type: text type: text
<weapon> <weapon>
@ -10029,10 +10075,11 @@ type: text
action: /call excuse action: /call excuse
created_on: 1236820003 created_on: 1236820003
enabled: 1 enabled: 1
last_referenced_on: 1277137283.63567
owner: pragma_ owner: pragma_
rate_limit: 15 rate_limit: 15
ref_count: 224 ref_count: 226
ref_user: megabraker ref_user: pragma_
type: text type: text
<what_answers> <what_answers>
@ -10059,9 +10106,10 @@ type: text
action: /say $who_answers action: /say $who_answers
created_on: 1258611970 created_on: 1258611970
enabled: 1 enabled: 1
last_referenced_on: 1277141657.64025
owner: pragma_ owner: pragma_
rate_limit: 15 rate_limit: 15
ref_count: 20 ref_count: 21
ref_user: megabraker ref_user: megabraker
type: text type: text
@ -10129,10 +10177,11 @@ type: module
action: wikipedia.pl action: wikipedia.pl
created_on: 1257554350 created_on: 1257554350
enabled: 1 enabled: 1
last_referenced_on: 1277172793.65619
owner: pragma_ owner: pragma_
rate_limit: 15 rate_limit: 15
ref_count: 387 ref_count: 388
ref_user: bearded_oneder ref_user: pragma_
type: module type: module
<win32> <win32>
@ -10259,10 +10308,11 @@ type: text
action: /say The XY problem: You want to do X, but don't know how. You think you can solve it using Y, but don't know how to do that, either. You ask about Y, which is a strange thing to want to do. Just ask about X. action: /say The XY problem: You want to do X, but don't know how. You think you can solve it using Y, but don't know how to do that, either. You ask about Y, which is a strange thing to want to do. Just ask about X.
created_on: 1175596315 created_on: 1175596315
enabled: 1 enabled: 1
last_referenced_on: 1277149829.60728
owner: Draconx|Laptop owner: Draconx|Laptop
rate_limit: 15 rate_limit: 15
ref_count: 169 ref_count: 170
ref_user: sn5 ref_user: habnabit
type: text type: text
<yo> <yo>

12
modules/ago.pl Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/perl
use Time::Duration;
my ($ago) = @ARGV;
if(not defined $ago) {
print "Usage: ago <seconds>\n";
exit 0;
}
print ago_exact($ago), "\n";