2011-06-28 08:11:32 +02:00
|
|
|
|
|
|
|
.. _plugin-utilities:
|
|
|
|
|
|
|
|
The Utilities plugin
|
|
|
|
====================
|
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-utilities-ignore:
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
utilities ignore requires no arguments
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2011-06-28 08:11:32 +02:00
|
|
|
|
|
|
|
Does nothing. Useful sometimes for sequencing commands when you don't
|
|
|
|
care about their non-error return values.
|
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-utilities-shuffle:
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
utilities shuffle <arg> [<arg> ...]
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2011-06-28 08:11:32 +02:00
|
|
|
|
|
|
|
Shuffles the arguments given.
|
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-utilities-success:
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
utilities success [<text>]
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2011-06-28 08:11:32 +02:00
|
|
|
|
|
|
|
Does nothing except to reply with a success message. This is useful
|
|
|
|
when you want to run multiple commands as nested commands, and don't
|
|
|
|
care about their output as long as they're successful. An error, of
|
|
|
|
course, will break out of this command. *<text>*, if given, will be
|
|
|
|
appended to the end of the success message.
|
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-utilities-echo:
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
utilities echo <text>
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^
|
2011-06-28 08:11:32 +02:00
|
|
|
|
|
|
|
Returns the arguments given it. Uses our standard substitute on the
|
|
|
|
string(s) given to it; $nick (or $who), $randomNick, $randomInt,
|
|
|
|
$botnick, $channel, $user, $host, $today, $now, and $randomDate are all
|
|
|
|
handled appropriately.
|
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-utilities-sample:
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
utilities sample <num> <arg> [<arg> ...]
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2011-06-28 08:11:32 +02:00
|
|
|
|
|
|
|
Randomly chooses *<num>* items out of the arguments given.
|
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-utilities-countargs:
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
utilities countargs <arg> [<arg> ...]
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2011-06-28 08:11:32 +02:00
|
|
|
|
|
|
|
Counts the arguments given.
|
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-utilities-last:
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
utilities last <text> [<text> ...]
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2011-06-28 08:11:32 +02:00
|
|
|
|
|
|
|
Returns the last argument given. Useful when you'd like multiple
|
|
|
|
nested commands to run, but only the output of the last one to be
|
|
|
|
returned.
|
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-utilities-apply:
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
utilities apply <command> <text>
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2011-06-28 08:11:32 +02:00
|
|
|
|
|
|
|
Tokenizes *<text>* and calls *<command>* with the resulting arguments.
|
|
|
|
|