commit e2945b532780f90e9c54fc99d872c434f59d45ee Author: Phil Carmody Date: Tue Apr 7 17:52:53 2020 +0300 index.html - fix missing Signed-off-by: Phil Carmody commit 2318d5bba3ea2d0b8bf8824e279e8e8ff91f1ec0 Author: Phil Carmody Date: Tue Apr 7 17:44:12 2020 +0300 index.html - fix missing s Signed-off-by: Phil Carmody commit 78c642b838c217a0a9532baaa50ffc95241f829a Author: Phil Carmody Date: Tue Apr 7 17:37:24 2020 +0300 nerd/events - a Loss and a Godsend regarding systemd Signed-off-by: Phil Carmody commit a0026859f0d57bfa62fcb6b68dff367d50d05034 Author: Phil Carmody Date: Tue Apr 7 16:31:45 2020 +0300 nerd/events - fix remaining fixed-gender messages Signed-off-by: Phil Carmody commit ef91c1e38688a39a4fb7691d280209c8f796e6db Author: Phil Carmody Date: Tue Apr 7 16:27:33 2020 +0300 index.html - fix broken code block in examples Signed-off-by: Phil Carmody commit 2ae3abc7bfa07e889634ff75ee8b0f87ea81963b Author: Phil Carmody Date: Tue Apr 7 15:02:50 2020 +0300 bot.pl - add a new 'zie'-based genderless pronoun set Some choice is good, therefore more choice is better. commit 5fb23b2f16c2d25f8d88ff42d25b2830fb7110c9 Author: Phil Carmody Date: Tue Apr 7 14:55:00 2020 +0300 bot.pl - clearer gender pronouns processing Signed-off-by: Phil Carmody commit 7858f8a9e2c29bc00cbe3f92a3239ae27626d66b Author: Phil Carmody Date: Sat Feb 16 14:30:14 2019 +0200 index.html - be more friendly Signed-off-by: Phil Carmody commit 4e21da008a437557651d57b18c83f0d1f84992e1 Author: Phil Carmody Date: Sat Feb 16 14:29:35 2019 +0200 bot - simplify info request handling Signed-off-by: Phil Carmody commit c7ca83b61c77cbb54349cb67cbdbf777c136e48b Author: Phil Carmody Date: Thu Aug 20 15:59:41 2015 +0300 trek: some events and items Signed-off-by: Phil Carmody commit a1d0acb2eab6410382d4b01a5b40de1574c11cb4 Author: Phil Carmody Date: Fri Jul 24 00:07:55 2015 +0300 documentation: add index.html Mostly up to date, the only missing bit is marked as such. Signed-off-by: Phil Carmody commit a3a2e5f1499e1c0e689847208636c14f4ccf807f Author: Phil Carmody Date: Thu Jul 23 12:43:21 2015 +0300 beer: events - add some new macro expansion choices ISO Amish Pale Ale! Signed-off-by: Phil Carmody commit 70eee2b9cd9ed2d5e24bc8049ea1fdf38c5b3b7f Author: Phil Carmody Date: Wed Jul 22 16:47:29 2015 +0300 trek: events - use new shorthand Cm/Cf event types Signed-off-by: Phil Carmody commit 179e7f485501b0403320617d6b3e5c11f208cc17 Author: Phil Carmody Date: Wed Jul 22 16:44:48 2015 +0300 bot.pl: events - add shorthand for single-gender G/C events e.g. Cf = C %!+f% More than one gender, or exclusion of a gender, and you need to use the full baroque syntax. This could trivially be extended to W/L events too, and probably others. Signed-off-by: Phil Carmody commit 9d9c2a5af1d0370e086ecbe39f28972257e28428 Author: Phil Carmody Date: Wed Jul 22 16:17:35 2015 +0300 trek: first hack at some Star Trek themed items/events Very minimal items currently, needs some real work. Events include something, usually a calamity, making reference to every single episode of TNG S01, and a few more generic ones. Uses the new "%![-+][mfn]+%" event prefixes, which quite obviously suck. Signed-off-by: Phil Carmody commit 41d018cd50403c7df95f7befd5066a764e5d1797 Author: Phil Carmody Date: Wed Jul 22 16:09:04 2015 +0300 bot.pl: permit restriction of some events to specific genders An event with the prefix %!+chars% or %!-chars% will be rejected if the (first) player's gender isn't (+) or is (-) in 'chars', where chars can be any or all of 'm', 'f', and 'n'. A player with 'u' or 'pc' gender is considered able to undergo all events. Intended only for C and G events initially, but this expansion applies to pretty much all event types so could be used elsewhere. (Note - item calamities/godsends are *not* C/G events.) The syntax is crummy, and should be made more easily usable Signed-off-by: Phil Carmody commit 2766dfb4bda4d50adaf444341f0fcaa6a013e8e3 Author: Phil Carmody Date: Wed Jul 22 16:06:26 2015 +0300 bot.pl: fix unnecessary name echoing when testing events Prefixing the name became unnecessary in commit 42af00cf bot.pl: make item events (c/g) understand more %variables% Signed-off-by: Phil Carmody commit 232533cdf694cdbc07a9601bad3d742159e9d077 Author: Phil Carmody Date: Wed Jul 22 16:00:08 2015 +0300 bot.pl: add name2gender() helper Other things may need the gender of non-existent players - e.g. events can be eventtest-ed using arbitrary names. Signed-off-by: Phil Carmody commit 299b577b8a3872e6c7b680a1f289982779806b37 Author: Phil Carmody Date: Wed Jul 22 14:32:50 2015 +0300 bot.pl: fix uninitialised $debug_reentrancy warning As lots of init happens at the top level, the lower definition isn't seen when the first call to debug() happens. Hence previously there was a console warning. Moving the definition before first possible use fixes that. Signed-off-by: Phil Carmody commit 53c4772b79206c5cdb28d29a1b88b9f908c968cb Author: Phil Carmody Date: Tue Jul 21 22:32:51 2015 +0300 bot.pl: harden expression expansion against evil player names Always do the player name expansion last, so that any % signs can cause no further variable expansion. Signed-off-by: Phil Carmody commit 42af00cfd3b9a346c79c58b527867585c4cf86a4 Author: Phil Carmody Date: Tue Jul 21 22:28:54 2015 +0300 bot.pl: make item events (c/g) understand more %variables% Firstly introduce the default-leading-%player% expansion into the core helper function, as all clients want it. Secondly, add %type% expansion to the event, as events should be about specific items too. Signed-off-by: Phil Carmody commit 8a1df75e8b257204676deb1071d14a7fc07a1a3a Author: Phil Carmody Date: Tue Jul 21 22:22:52 2015 +0300 bot.pl: fix inability to modify items with typeid 0 0 is false, but it is an itemid. Check definedness instead. Signed-off-by: Phil Carmody commit 6bdbfca7948e8ec8b86bcd9b153d3a999cba49a5 Author: Phil Carmody Date: Tue Jul 21 14:15:00 2015 +0300 bot.pl: fix mis-indexing of fragile items $_ is the number itself, which is the type id, not the index in the @fragileitems array where that number resides. Signed-off-by: Phil Carmody commit 5862bc821eda06eb9dd97aedaca123ee5263e7d4 Author: Phil Carmody Date: Mon Jul 20 11:13:37 2015 +0300 bot.pl: dropped items - fix to ensure there's a default base longevity Reliance on uninitialised variable ensued when it wasn't set. Introduced in: commit 28d93d8e bot.pl: use itemdbfile not rpitembase to test if dropping items Signed-off-by: Phil Carmody commit 6ffe4f7d037c9d0fb2ca1fbd25d40083d668a59f Author: Phil Carmody Date: Mon Jul 20 11:23:23 2015 +0300 bot.pl: remove rpitemstep since decay is linear Should have been removed in: commit 1559c46f bot.pl: KISS-ify dropped item decay Signed-off-by: Phil Carmody commit 8ca72316320767eb55e55f2868979bf421814bbd Author: Phil Carmody Date: Mon Jul 20 11:07:09 2015 +0300 beer: events - fix trailing whitespace. Signed-off-by: Phil Carmody commit 807ef3821a02dc80569f2d636dda3643615d0061 Author: Phil Carmody Date: Tue May 19 19:50:37 2015 +0300 bot.pl: make reentrancy checking a truly global variable The previous code caused warnings, it may not even have worked. Signed-off-by: Phil Carmody commit 088416c8538134be09a40da542440c69ad98c82c Author: Phil Carmody Date: Tue May 19 19:49:29 2015 +0300 items.txt - take advantage of implicit punctuation Slightly churny, but now we have the feature we should use it. Signed-off-by: Phil Carmody commit f7056c6db197cc91b8d4defc30b631df016ff317 Author: Phil Carmody Date: Tue May 19 19:43:21 2015 +0300 bot.pl: let item modifications be implicitly punctuated They all end in "!", there's no need to actually have that in every string. Signed-off-by: Phil Carmody commit 851e8e3625940574cce8563a47660a71d3f498ea Author: Phil Carmody Date: Tue May 19 19:37:06 2015 +0300 bot.pl: more flexibility for item godsends/calamaties Permit things like c="Rust develops on %player%'s %type%!". Treat a leading "%player%" as implicit which is prepended if that string is otherwise absent. Signed-off-by: Phil Carmody commit 6c194733c85b7da746eb84c7fe96f82726d45d86 Author: Phil Carmody Date: Tue May 19 19:12:38 2015 +0300 beer: fix item calamaty grammer "player object" should be "player's object". Signed-off-by: Phil Carmody commit 5e846c75f538b29771dcd447646a22c730dc7b6b Author: Phil Carmody Date: Tue May 19 18:44:26 2015 +0300 nerd: more event/item customisations Signed-off-by: Phil Carmody commit 1559c46fabf0dd75955d280a2bc170a84f2995af Author: Phil Carmody Date: Thu Apr 23 16:33:21 2015 +0300 bot.pl: KISS-ify dropped item decay Linear. No bumps, humps, troughs, ramps, or any crap like that. One parameter - decay time per level. Signed-off-by: Phil Carmody commit 751c6b0df1d89e8ec48cd0fb7f9a6b073fdcf3ba Author: Phil Carmody Date: Sun Apr 19 22:52:39 2015 +0300 nerd: items - put space between number and unit in hard disks 800GB was just way too difficult to read. Signed-off-by: Phil Carmody commit 622ea790ba8c9ce9abf08983be5f0ec2fce175db Author: Phil Carmody Date: Sun Apr 19 20:36:58 2015 +0300 nerd: events - more versions of Windows to be installed Signed-off-by: Phil Carmody commit 192c215fff9c038ca61c8f0790f47c78486e0b2d Author: Phil Carmody Date: Sat Apr 18 21:31:35 2015 +0300 nerd: items - Linux 4.0+ - Hurr Durr, I'm a sheep Signed-off-by: Phil Carmody commit dd90fa1f6116bbdaa61a65e4d27c427df8f8d915 Author: Phil Carmody Date: Sat Apr 18 21:24:35 2015 +0300 bot.pl: prevent possible endless loop in modify_item If only godsends or only calamaties are defined for items, then if an event of the wrong parity is chosen, the loop would loop for ever trying to find an event of the nonexistent type. Signed-off-by: Phil Carmody commit 962afea3f2163c27f4b9f893f8f4cefc54f96841 Author: Phil Carmody Date: Sat Apr 18 20:32:56 2015 +0300 bot.pl: document a few more of the parameters Signed-off-by: Phil Carmody commit 28d93d8ec443241c466bc8b9eccbfadb1d516ee4 Author: Phil Carmody Date: Sat Apr 18 20:12:45 2015 +0300 bot.pl: use itemdbfile not rpitembase to test if dropping items We can't drop without the file to drop into, so it's the simplest thing to check for. Signed-off-by: Phil Carmody commit 50809c3d91303fc71bfd841e425bc594f9429c18 Author: Phil Carmody Date: Sat Apr 18 20:06:43 2015 +0300 bot.pl: give logfile for dropped item decay a more sensible setting It was too similar to the database file setting. Just call it decayfile, as that's what the logs basically are. Signed-off-by: Phil Carmody commit 8ad8bef06947f400e04cf1d1bb463067b578778a Author: Phil Carmody Date: Sat Apr 18 20:04:15 2015 +0300 bot.pl: make the dropped item decay curve not max out Just a slow and steady growth happens after reaching the 86400 cusp. Signed-off-by: Phil Carmody commit d0591de21e7e3b00f3c3001a7dbac47d85f88c10 Author: Phil Carmody Date: Sat Apr 18 19:11:27 2015 +0300 bot.pl: adjust dropped object delay rates This slowly ramps up at the default (600/1.06) settings, and never lets any item stay at a level for more than 1 day. That upper bound could be made less rigid, so a FIXME comment has been added. Signed-off-by: Phil Carmody commit 283db985be4278ab895f0318f9a7f9dafea4da4e Author: Phil Carmody Date: Sat Apr 18 15:19:24 2015 +0300 bot.pl: add separate mapitem logging Signed-off-by: Phil Carmody commit 5c035cabceeddf36f16b826cc0e74dd04e22a6ac Author: Phil Carmody Date: Sat Apr 18 15:17:48 2015 +0300 bot.pl: don't log a message to nowhere Signed-off-by: Phil Carmody commit 155d10bf40a47323b507ac30b39261e11bbc8ef3 Author: Phil Carmody Date: Sat Apr 18 15:16:15 2015 +0300 bot.pl: short circuit dropped item decay when items aren't dropped Signed-off-by: Phil Carmody commit 661ebf63c337fe2d7ef93c8ccea6464b1b6f3741 Author: Phil Carmody Date: Fri Apr 17 18:31:54 2015 +0300 bot.pl: mode debug logging into generic log framework As the generic log framework falls back on debug messages, it needs to prevent re-entrancy. Signed-off-by: Phil Carmody commit 10f9901bc007982a74b7629d0b5a35aec921aa7c Author: Phil Carmody Date: Fri Apr 17 17:50:02 2015 +0300 bot.pl: abstract logging out to arbitrary files Signed-off-by: Phil Carmody commit f8a1b1fab87e771c783cd0b24b0ea334d26c557e Author: Phil Carmody Date: Fri Apr 17 01:06:16 2015 +0300 bot.pl: simplify get_event syntax Perl == line noise... Signed-off-by: Phil Carmody commit ecdf4d7b4fc536dfdbd9dcdbfa524f58e068eaae Author: Phil Carmody Date: Fri Apr 17 00:41:59 2015 +0300 bot.pl: better gender conjugation 'is' and 'has' Add intelligence to prevent this from happening: < beerbot> juovo realises that they has lost their way Signed-off-by: Phil Carmody commit f9875e1a92961bb4750f2632537b13513f03d19d Author: Phil Carmody Date: Thu Jun 12 19:00:12 2014 +0300 bot.pl: itemdb - let no file == empty file So firstly, it's not an error if it doesn't exist, but we must initialise the hash/flag correctly. Secondly, we can delete it if we put nothing in it. This means that the backup function won't make needless dupes. Signed-off-by: Phil Carmody commit ed89b7bea7e605d874bbafeb9f593cd4754340f5 Author: Phil Carmody Date: Thu Jun 12 18:42:00 2014 +0300 bot.pl: mapitems - do not save file if no changes Keep a dirty flag updated when the map items change. Alas, it doesn't stop the file from being backed up regularly. Signed-off-by: Phil Carmody commit edcc9d7bc561b08628dd714407355b737cadad4f Author: Phil Carmody Date: Sun May 18 20:57:53 2014 +0300 bot.pl: fix bracketting typo which broke the script Introduced half a dozen commits back in commit 5a6e2f186bd2 Date: Sun May 18 16:08:13 2014 +0300 bot.pl: Simplify penance customisation for all alignments Signed-off-by: Phil Carmody commit af10c7c8daaf23e6ecc157d6c304d813101b270d Author: Phil Carmody Date: Sun Jun 8 20:03:30 2014 +0300 bot.pl: make challenge frequency tweakable Signed-off-by: Phil Carmody commit f9b269d63346628530435db58d808af4d12af9bf Author: Phil Carmody Date: Sat Jun 7 10:30:36 2014 +0300 bot.pl: simplify quest file writing options There's no need for both a file name and a boolean flag. If there's a filename set, then that means write to it. Signed-off-by: Phil Carmody commit 389275f7f18a5e8366f10b4fde45590f7d174703 Author: Phil Carmody Date: Sat Jun 7 10:23:39 2014 +0300 bot.pl: improve documentation of the settings Signed-off-by: Phil Carmody commit 30cdc601900e15e4d0f0d6f5f8067b633fb16622 Author: Phil Carmody Date: Tue Jun 3 21:33:06 2014 +0300 bot.pl: cosmetic - canonicalise %opts access Nobody else uses 'quotes', so remove them here. Signed-off-by: Phil Carmody commit fcfa08d68dfa802a27bcc33d9590ba0cf1a4bc16 Author: Phil Carmody Date: Tue Jun 3 15:43:37 2014 +0300 bot.pl: canonicalise rpreport conditions Only do one thing per if(), so that all of the independent events can be handled independently of each other. Signed-off-by: Phil Carmody commit 5a6e2f186bd21af48d4b86f9ea991834f20da977 Author: Phil Carmody Date: Sun May 18 16:08:13 2014 +0300 bot.pl: Simplify penance customisation for all alignments Sometimes, you don't want to define all of PG, PN, and PE - so just use PA to define a message that applies to all alignments. Specalised ones can coexist with these universal ones. Signed-off-by: Phil Carmody commit 6824c8867b43bac4f5fbbfeb78ef65c93c2cd20b Author: Phil Carmody Date: Sun May 18 15:54:53 2014 +0300 bot.pl: add penance to stop times spiralling out of control With few players, an unlucky one with poor kit will keep losing fights, and her time to level up will exponentially grow from the losses. Prevent this spiralling out of control by pulling the player's level down by one, and resetting their clock, so they have to do the whole previous level again. They do not pass go, and do not collect 200 pounds. The message has 2 parts, first the supplication, which depends on the player's alignment, PG, PN, and PE, and secondly the penance itself, P. Defaults are provided for all of these messages if no themed ones are available. Note that the level down takes place between supplication and pennance, so that the %level% macro expands to different numbers. Signed-off-by: Phil Carmody commit c9fe31e1df8255a97de579eb7baeacb71bdc3ad4 Author: Phil Carmody Date: Fri May 16 11:15:26 2014 +0300 bot.pl: enable %level% in the same contexts as %player% It expands to their current level. %level0% and %level1% likewise in multi-player expansions. Signed-off-by: Phil Carmody commit bb1ae15c4b9deca556b7f2d936d1df8c550349b4 Author: Phil Carmody Date: Fri May 16 00:31:37 2014 +0300 bot.pl: rename fight helpers to be more obvious Signed-off-by: Phil Carmody commit 0b09d8f4c35565a5018839e4deeb9516c782c08b Author: Phil Carmody Date: Thu May 1 15:24:57 2014 +0300 bot.pl: fix extra 'and' in inventory list Added by the list helper now, no need to add manually. Signed-off-by: Phil Carmody commit 206073954d3936dab54fa41f57360aff3b9c3a51 Author: Phil Carmody Date: Tue Mar 11 02:19:56 2014 +0200 bot.pl: exit early from challenge helper if opponent is bot We can't damage it, and can't steal from it, just bail. Signed-off-by: Phil Carmody commit d23fe8881b9ca20ff4764bfe7b5a06259ecfb57c Author: Phil Carmody Date: Tue Mar 11 01:27:36 2014 +0200 bot.pl: make new_generic_battle_helper return a ratio for the score This is the proportion of the winner's score p0 won, or was defeated by. You can never win by more than your whole score, so return 1.0. You can never lose by more than your opponent's score, so return -1.0 Signed-off-by: Phil Carmody commit 4f539c4b75010c402c4f09582dd8997bee5ace47 Author: Phil Carmody Date: Mon Mar 10 12:38:35 2014 +0200 bot.pl: pull shared generic battle code into new helper Signed-off-by: Phil Carmody commit 11492c7626dbc857f7637962873088412dfa45f5 Author: Phil Carmody Date: Sun Mar 9 20:48:13 2014 +0200 bot.pl: new admin command - 'brawl' By default it's a gentleman's duel, and the winner benefits. However, with 'evil' as a modifier, it becomes an honourless brawl, and the loser will be set back. Signed-off-by: Phil Carmody commit 0b3852d30cd73b853c6d156a4feca01d92495ed4 Author: Phil Carmody Date: Sun Mar 9 13:23:59 2014 +0200 bot.pl: create a symmetrical fight helper Presently, fights are asymmetrical - one player fights another, and it's the instigator whose time changes. However, there's no "play to win" or "play to avoid a loss" symmetry. This new helper takes a flag which has the following values: -1: only time may be subtracted, from the winner. 0: as before, instigator (player 0) has his time changed. +1: only time may be added, to the loser. Of course, if the bot has to change time, which can only happen if the flag's non-zero, or he's player 0 with flag=0, then the thing's a nonsense, and in that case, just back away... Presently no hooks call this. Signed-off-by: Phil Carmody commit cbbd389f3c2f9d969d775d319ee5c49f25dfdc9e Author: Phil Carmody Date: Wed Apr 2 22:56:05 2014 +0300 bot.pl: add a new admin debugging aid 'eventtest' This will create a random event of the chosen type (GCWLHE), and echo it back. Only player and programattic replacements can be made, event specific ones (%gain%, etc) can't be, obviously. Signed-off-by: Phil Carmody commit b057bfe2998fb15bfef4f24f087d1f83963a758a Author: Phil Carmody Date: Wed Apr 2 22:54:03 2014 +0300 bot.pl: harden him()/his()/... helpers If they don't know the name, they give a generic (unknown) pronoun Signed-off-by: Phil Carmody commit 0c4b3235c28a60bd3e839952210161337ac30b47 Author: Phil Carmody Date: Wed Apr 2 22:53:23 2014 +0300 beer/events.txt: fix up new event was mangled, should squash Signed-off-by: Phil Carmody commit 4d9ce85b39b8f61102cd0d3c6841946fad37b840 Author: Phil Carmody Date: Wed Apr 2 21:35:09 2014 +0300 beer/events.txt: invent a new beer style Inspired by Marduk's comment on IRC. Signed-off-by: Phil Carmody commit 6202034c2bc6b1205862adbff166423b07770c8f Author: Phil Carmody Date: Wed Apr 2 20:18:29 2014 +0300 bot.pl,events.txt: change QI and QS macro expectations They should use the new %players% macro, not the fudged %player% one. Signed-off-by: Phil Carmody commit 283350c60e238d33c1fba09424ddd2a51cb05c32 Author: Phil Carmody Date: Wed Apr 2 19:50:43 2014 +0300 bot.pl: more use of the comma_list helper Signed-off-by: Phil Carmody commit d5b974e46416e0ce1eec0650ababe71bd544c385 Author: Phil Carmody Date: Wed Apr 2 19:13:49 2014 +0300 bot.pl: bugfix - quest reporting had duplicated elements The quest text now contains the questers and the initialisation blurb already, so duplication must be dropped from the reporting code. Signed-off-by: Phil Carmody commit 16c9791dcbdae5b62fff80d8130b0e97a7851db5 Author: Phil Carmody Date: Wed Apr 2 18:04:37 2014 +0300 bot.pl: add a %players% macro which will list expand Presently unused, but will be usable for quest events. The helper function is usable in an even broader set of contexts. Signed-off-by: Phil Carmody commit 80aced7b30c4d892e6b9921b3882b4e68cecec8e Author: Phil Carmody Date: Wed Apr 2 17:36:09 2014 +0300 bot.pl: push holiness() and evilness() through the get_event helper That way it can get all of the programattic expansion that all other events have. Signed-off-by: Phil Carmody commit 68ab76ed0053c6d9cec605cc0e97777305c04505 Author: Phil Carmody Date: Wed Apr 2 17:30:44 2014 +0300 bot.pl: change get_event so it takes a player list (by reference) That way, it can be used for multi-player events. The quests with their "a, b, c and d" lists are still treated as a single player, but that could be changed. Signed-off-by: Phil Carmody commit 11f2bc54024e5b963b710fc9fd937506452afa44 Author: Phil Carmody Date: Mon Mar 24 03:06:37 2014 +0200 bot.pl: rewrite programattic elements in quest descriptions Signed-off-by: Phil Carmody commit 55d339c20f7c8df5eb400c53f43924d3efb0e018 Author: Phil Carmody Date: Mon Mar 24 03:05:44 2014 +0200 bot.pl: split rewrite_event into 2 parts The programatics elements may want to be rewritten independently of the player aspects. Signed-off-by: Phil Carmody commit ffcc40723873aea5adec2f2e62c70a98e72e9e34 Author: Phil Carmody Date: Wed Mar 19 15:03:05 2014 +0200 beer/events.txt: accidentally a new event Signed-off-by: Phil Carmody commit 6a5b004b0e85b24565604a3a20705cc86f38415a Author: Phil Carmody Date: Wed Mar 19 14:38:18 2014 +0200 nerd/events.txt: accidentally a new event Signed-off-by: Phil Carmody commit 72383450b9c96a81ad0984e51984ebeca1ca603b Author: Phil Carmody Date: Sat Mar 15 17:14:09 2014 +0200 bot.pl: rewrite_event - in substr, use the length not the end Signed-off-by: Phil Carmody commit 325aa3935bc9085d511e305c7f25a028c6d9b324 Author: Phil Carmody Date: Sat Mar 15 17:15:05 2014 +0200 bot.pl: rewrite_events - grab macro bounds correctly Since we added .* to the beginning, $-[0] has moved. Signed-off-by: Phil Carmody commit 2bc4a2881cf2ae1bf74a00011c9fffdfbc86d16b Author: Phil Carmody Date: Sat Mar 15 14:14:18 2014 +0200 nerd/events.txt: Khyber's DDoS threat needs repeating Signed-off-by: Phil Carmody commit 33d9915867dbb0ddec3726ff80a2e20977f6c23d Author: Phil Carmody Date: Sat Mar 15 14:10:50 2014 +0200 bot.pl: enable nested computed components in events E.g. "did %{an X|a Y|a Z|%{2#+1#9}% Zs}%" Work from the inside out. Uses a leading .* which can have nasty big-Oh from backtracking in corner cases, but those are irrelevant for the kinds of sentences we'll be writing. Signed-off-by: Phil Carmody commit a255091e0c68f68eef72e04fc02e2834126d0074 Author: Phil Carmody Date: Fri Mar 14 19:26:14 2014 +0200 nerd/events.txt: previous fix was no good, interpol and UNIT are broken too Signed-off-by: Phil Carmody commit 40330631bea09f8a6a8446ac160e27bcea13f41b Author: Phil Carmody Date: Fri Mar 14 19:21:42 2014 +0200 nerd/events.txt: fix repeated word Signed-off-by: Phil Carmody commit 0867f6c81556e3abb5ad4f65d3977d0b36ce27c8 Author: Phil Carmody Date: Fri Mar 14 11:46:09 2014 +0200 events.txt,nerd/events.txt: typo cleanups Signed-off-by: Phil Carmody commit 2b009e162af58dc386dd0bec065ecf8afa2ab311 Author: Phil Carmody Date: Thu Mar 13 23:39:55 2014 +0200 bot.pl: don't capture the \n before parsing Parsing just gets rid of it anyway. Signed-off-by: Phil Carmody commit 3a95899bf0cc8e0db4385c0480cf4a1681805157 Author: Phil Carmody Date: Thu Mar 13 16:54:48 2014 +0200 bot.pl: fix collision fight probability scalar(@temp) was used to generate random numbers, so remember it; Signed-off-by: Phil Carmody commit 1d12cd9fbae72d250eb7e0e2f05563ee0a4e5109 Author: Phil Carmody Date: Thu Mar 13 16:44:23 2014 +0200 nerd/events.txt: QI message - FSF/EFF/ACLU Signed-off-by: Phil Carmody commit e712fc49365e4a875f31c7cc5eb2c5bbba9ba3e3 Author: Phil Carmody Date: Thu Mar 13 16:15:45 2014 +0200 bot.pl: move players in random order If the player hash doesn't change, the order in which players move will be fixed. That means that pA will always get to a square before pB for all A commit ca69bc3cba7d74277865c7aec4438fe0a948cb64 Author: Phil Carmody Date: Thu Mar 13 15:07:54 2014 +0200 nerd/events.txt: "Soylentology" just must be in some events The name came from MrBluze on the staff IRC channel. Signed-off-by: Phil Carmody commit 11838f2f7b7352aeea5876f93283e607466c6cc8 Author: Phil Carmody Date: Thu Mar 13 14:46:25 2014 +0200 bot.pl: bugfix - actually name the quest Signed-off-by: Phil Carmody commit 7339161fac93e16ed22877154da10160f92a60df Author: Phil Carmody Date: Thu Mar 13 00:40:44 2014 +0200 bot.pl: bugfix - fix fencepost error in map size The conf file says "width" and "height". So if it says 500, then the valid addresses are 0..499. Therefore wrap 500 to 0, and -1 to 499. Signed-off-by: Phil Carmody commit 41bc07422439bb0dfd3616eaabf1f432844f85bc Author: Phil Carmody Date: Thu Mar 13 00:16:36 2014 +0200 bot.pl: line parser simplification The s/// operator exists for a reason. Signed-off-by: Phil Carmody commit 0aef746e5efacc241a84a79b7b4e1e12e37dbd96 Author: Phil Carmody Date: Wed Mar 12 17:58:48 2014 +0200 bot.pl: delay initialisation of penalty variables Move closer to where they're used. Signed-off-by: Phil Carmody commit 760122c1e079913ad6b71f3a63b41f0d652fa586 Author: Phil Carmody Date: Wed Mar 12 16:04:51 2014 +0200 bot.pl: get quest intro from the events file, or neutral default More removal of "gods", which won't be appropriate for all themes. Signed-off-by: Phil Carmody commit e0b95d838f12dfea2682ecaeb665854b0768c05a Author: Phil Carmody Date: Wed Mar 12 14:57:16 2014 +0200 events.pl: default fantasy quest introduction sentence stashed here We'll later fetch it from here rather than it being hard coded as a string in the code. Signed-off-by: Phil Carmody commit 9d0cd0073fdf7f5ea0e09aed4e2c4e5c034bc4e6 Author: Phil Carmody Date: Wed Mar 12 13:29:33 2014 +0200 bot.pl: merge identical penalties Signed-off-by: Phil Carmody commit f6a142e5b2c4824537794658f3ddc5196b265b1a Author: Phil Carmody Date: Wed Mar 12 13:26:26 2014 +0200 bot.pl: reorder penalties to put more similar things nearer each other Signed-off-by: Phil Carmody commit c88bf10bdee14cf7d160075837df8ccbf6aa1a26 Author: Phil Carmody Date: Wed Mar 12 13:25:16 2014 +0200 bot.pl: make penalties more data driven Signed-off-by: Phil Carmody commit 4459408c0e254450d6c42312b2f12d75d3f358c6 Author: Phil Carmody Date: Tue Mar 11 00:59:55 2014 +0200 bot.pl: neutral default quest messages, and themed ones from file Signed-off-by: Phil Carmody commit 13c794c47ba5085206d7307bc8755ecf293e6b5c Author: Phil Carmody Date: Tue Mar 11 00:57:57 2014 +0200 events.txt: stow the default quest messages safely in this file We'll soon need to fetch them from here. Signed-off-by: Phil Carmody commit 1f04c492c54c832dc3b376b1da2ed43ac7034e13 Author: Phil Carmody Date: Mon Mar 10 12:56:19 2014 +0200 bot.pl: bugfix - restoring quests never worked a) Wasn't reading the right file! b) Was out by one on quester numbers (1-4 in file, 0-3 in struct). Signed-off-by: Phil Carmody commit f20be12050f48e555c1897970d263e57061536a5 Author: Phil Carmody Date: Mon Mar 10 00:45:25 2014 +0200 bot.pl: bugfix - restore prior challenge/collision alignment behaviour Bug, removing distinction between challenge and collision, was introduced here: commit 9e3fc28a94d2f9512473ae786dc6dc2deb829e1f Author: Phil Carmody Date: Sun Mar 9 14:28:16 2014 +0200 bot.pl: pass string to generic fight function rather than flag Signed-off-by: Phil Carmody commit e2e78edc48aee0fb709e5961ffbcbbb5a50c90b9 Author: Phil Carmody Date: Sun Mar 9 20:58:12 2014 +0200 nerd/events.txt: two new weenie-riot quests Which OO language is better? Which init system is better? Flame on! Signed-off-by: Phil Carmody commit 0b2285e01f782131f1a9e85dc777b86846384bcf Author: Phil Carmody Date: Sun Mar 9 14:53:09 2014 +0200 bot.pl: bugfix - the bot doesn't have a gender Can't use the them() funcion on it, as it has no %rps entry. This seems to be the only caller that can have $primnick as a player name, so we can keep the core helpers simple and naive. This was a horrible bug, the them() function was causing an %rps record to be created for thebot, which was causing deep recursion in itemsum later. Signed-off-by: Phil Carmody commit 091bc69a88fc173947adb4d313a167ab615bcd80 Author: Phil Carmody Date: Sun Mar 9 14:29:53 2014 +0200 bot.pl: simplify opponent selection in challenge Simply select from all online players, and then substitute the bot if you pick yourself. Signed-off-by: Phil Carmody commit 9e3fc28a94d2f9512473ae786dc6dc2deb829e1f Author: Phil Carmody Date: Sun Mar 9 14:28:16 2014 +0200 bot.pl: pass string to generic fight function rather than flag Permits more types of challenge/collision/etc. Signed-off-by: Phil Carmody commit 70c058d5031766948082723352c0ca8967cbe06d Author: Phil Carmody Date: Sun Mar 9 03:33:44 2014 +0200 nerd/events.txt: a few more calamities and godsends Signed-off-by: Phil Carmody commit 4bc33c10de55427da31fdc015cc5969d76cb1794 Author: Phil Carmody Date: Sun Mar 9 02:59:07 2014 +0200 nerd/items.txt: use some of the new spangly bot features for types multi-delta programattic expressions for RAM %type% in several places %notype% for core storage Also added a new unique modem (tachyonic antitelephone, one of einstein's) Signed-off-by: Phil Carmody commit 7624e6e6ef5b8b64603407f0624ba66e63c5e5d4 Author: Phil Carmody Date: Sun Mar 9 02:11:45 2014 +0200 bot.pl: enable marking type-aliases with %notype% to avoid repetition If the type is coffee machine, then a unique civet will not contain that type word, and must never be suffixed with that word. So add %notype% to prevent addition of the type ever. Signed-off-by: Phil Carmody commit 7cd31c228e788228819810144b5bb4ba0f113d75 Author: Phil Carmody Date: Sun Mar 9 02:05:56 2014 +0200 bot.pl: enable forced upper casing of %type% replacement type => object verbatim (presumed lower case) Type => Object (made title case) TYPE => OBJECT (made all caps) Signed-off-by: Phil Carmody commit 0f07941ecb0caa29d3da8d807a62d22d984cc3ab Author: Phil Carmody Date: Sun Mar 9 00:11:46 2014 +0200 bot.pl: make character initialisation order the same First the common fields, then the fields which will be different between offline owner account creation and online user account creation. Signed-off-by: Phil Carmody commit 81731ff5d957629327cd7cdc4a67ceb58332152f Author: Phil Carmody Date: Sun Mar 9 00:04:19 2014 +0200 bot.pl: use helper variable to reduce noise in account creation This makes it more similar to the owner account creation. Note, the whole block has changed whitespace indentation. No functional changes. Signed-off-by: Phil Carmody commit b8c356de0668376d7ee624a06ba756a082d31579 Author: Phil Carmody Date: Sat Mar 8 22:39:37 2014 +0200 bot.pl: merge the two 1-on-1 fights into one function They were clearly copy-pasted in the first place, as the collision fight used to check whether you were colliding with the bot! Parametrise them - the only differences are the relevance of alignment on critical strikes (why? is that just oversight due to unnecessary duplication of the code?) and the message: "came upon" vs. "challenged". Only preserving the former due to back-ass-ward compatibility. Signed-off-by: Phil Carmody commit 4b91028177306c87870b65410cd4b1d25f3bdd0a Author: Phil Carmody Date: Sat Mar 8 02:24:25 2014 +0200 bot.pl: for programmatic levels, permit sets of deltas Basically, this is so that I can go 2,3,4,6,8,12,16,24,32,48,... That alas requires scale values of *1.33333 and 1.5, which means that the delta precision is no longer the desired precision. Therefore set the max precision in such cases from the initial value's precision, not the delta's. Signed-off-by: Phil Carmody commit 7df3d85a2cc10c270ba6c0bcfc6b37d5e1510f41 Author: Phil Carmody Date: Sat Mar 8 01:54:08 2014 +0200 nerd/items.txt: migrate to new description != enemies' reaction format Signed-off-by: Phil Carmody commit cddf1643c767d035743d7d306bc3acbf784aba8c Author: Phil Carmody Date: Sat Mar 8 01:51:35 2014 +0200 bot.pl: split the enemies' reactions from the unique description Has backward compatibility with old items.txt files, but introduces an enemies' reaction field. Old style files will have their sentences automatically separated when reading them in. Signed-off-by: Phil Carmody commit 96af9d2b4424dd2b6af8719bd6a193264e98e4b8 Author: Phil Carmody Date: Sat Mar 8 00:39:13 2014 +0200 bot.pl: pull article and saytype handling out of leaf functions This permits item_describe to do all the logic for both uniques and plain items. It also means the clients don't need to select 'a' or 'the' as the article. Alas the full description of uniques, i.e. the "your enemies swoon..." bit, is messing up the interface, and one client can't use the item_describe interface, having to go straight to unique_describe to get the "full" description. That's lame. The description should be split. Signed-off-by: Phil Carmody commit d990cc968e25dce38dfb6626f4d3d251e7874faf Author: Phil Carmody Date: Fri Mar 7 18:58:39 2014 +0200 nerd/items.txt: add some %type% markers to unique descriptions Signed-off-by: Phil Carmody commit 1781d9111be6120f113ad333af7e04d07a6bd4c0 Author: Phil Carmody Date: Fri Mar 7 18:54:02 2014 +0200 bot.pl: unique_describe detects and replaces type descriptors And then only appends the type descriptor if needed. Signed-off-by: Phil Carmody commit c90d38df9f403798de01fdfc8ea26c2f0ef71608 Author: Phil Carmody Date: Fri Mar 7 18:46:01 2014 +0200 bot.pl: add a saytype parameter to item_describe And to all the helpers it calls too. This is because we don't want to return a value to the caller to tell it whether we said the type or not when expanding a unique's name, so it should just tell us to append the type if it's sure it needs it. item_describe's helpers can then decide if they've already said enough, in which case they don't need to say the type, or if they haven't, in which case they do appent the type. Currently, nothing actually detects the types in the names, so there should be no visible changes. Signed-off-by: Phil Carmody commit 64d439651f3cb24116e8450ad6fdf8973db450b0 Author: Phil Carmody Date: Fri Mar 7 18:16:40 2014 +0200 bot.pl: loosen uniq_describe interface to take struct rather than desc From struct, we can get all the other info that we might need, such as the type. That will be useful later when we need to ensure the type is in the description. Signed-off-by: Phil Carmody commit c0acb8c2bea9551b0b2cde31f273f0f9ee0b4965 Author: Phil Carmody Date: Fri Mar 7 18:07:58 2014 +0200 bot.pl: fix caller to item_describe - should squash Signed-off-by: Phil Carmody commit c43e865e35ed63a2a0106e9f88144e36b4ad4f00 Author: Phil Carmody Date: Fri Mar 7 17:58:53 2014 +0200 bot.pl: improve plain_describe readability Comment interface, and explicitly name the 2nd parameter ($level). Signed-off-by: Phil Carmody commit cce11c792cde11189eb2f58004d0baff4cd66718 Author: Phil Carmody Date: Fri Mar 7 17:53:28 2014 +0200 bot.pl: improve item describe function names The helpers to item_describe also describe. Make that clear. Clarify the interface with some comments too. Signed-off-by: Phil Carmody commit 814b797d94de00a45bb049f7bdf0bc3a91800db3 Author: Phil Carmody Date: Fri Mar 7 14:02:41 2014 +0200 nerd/events.txt: some new nerdy events Mostly C/G, but promoted the Linus C to be a L. Signed-off-by: Phil Carmody commit cd211248d38d864364e892d27dfccf64dc220d0e Author: Phil Carmody Date: Thu Mar 6 18:33:07 2014 +0200 bot.pl: permit users to change their class If you're logged in, and you had full permission to chose your class in the first place, then you should be permitted to change it. IMHO. Requested-by: mattie_p on #Soylent Signed-off-by: Phil Carmody commit fe49929dec7f71a6bbfe8a36a5382fa772d98c7c Author: Phil Carmody Date: Thu Mar 6 18:31:53 2014 +0200 bot.pl: remove redundant logged in calls Signed-off-by: Phil Carmody commit 35fdfcc79c2cfb476b8b83539dd70e7dd56435aa Author: Phil Carmody Date: Thu Mar 6 18:24:51 2014 +0200 bot.pl: new quick logged-in checker Belt and braces at the moment, the old checks remain redundantly. Signed-off-by: Phil Carmody commit 602032aa84eb07c0cd079db3d1f2ae7144c187b9 Author: Phil Carmody Date: Thu Mar 6 18:23:14 2014 +0200 bot.pl: remove undefined variable warning from admin permission checker Signed-off-by: Phil Carmody commit e2d38f9c31b2ccde0f1c04fa985e6d8bdb557120 Author: Phil Carmody Date: Wed Mar 5 12:39:01 2014 +0200 bot.pl: prepare for expanded gamut of checks for message permissions Presently, it's just admin-related, but we could also demand that they are simply logged in. Signed-off-by: Phil Carmody commit 56df1dc3ad7f7d30aae02ebbf24d00343d266ae6 Author: Phil Carmody Date: Wed Mar 5 12:09:58 2014 +0200 bot.pl: throw away redundant ha() checks The data-driven function works fine, this boilerplate is unneccessary now. Signed-off-by: Phil Carmody commit 5a7ec576d87bf31169c27f372e4e9a6a9c48755f Author: Phil Carmody Date: Wed Mar 5 11:54:17 2014 +0200 bot.pl: extract admin checks into data-driven helper Signed-off-by: Phil Carmody commit 5168ebf8fd9c0545420ea46c62ba11ea3dd4b34a Author: Phil Carmody Date: Fri Mar 7 13:20:04 2014 +0200 bot.pl: friendlier quit/restart messages The admin can give a reason for the die/restart if he sees fit. Also, the message doesn't need the admin's whole ident, only the nick, as people can /whois on that if they really care (and if the admin is somehow cloaked frmo whois, then we should respect that). Signed-off-by: Phil Carmody commit 62a270179318ef7c1f1b84199f18142ea539af19 Author: Phil Carmody Date: Fri Mar 7 13:01:46 2014 +0200 bot.pl: use current branch, not master in updates check Also, we don't ever use the script directory per se, only the git directory, so just call it that and append .git. Signed-off-by: Phil Carmody commit 7d2578ab98454015435f2f4114286efa9cf6c185 Author: Phil Carmody Date: Fri Mar 7 13:00:31 2014 +0200 bot.pl: put spaces into ($) prototypes, it confuses emacs It thinks $) is a variable, and gets the bracked matching wrong. Signed-off-by: Phil Carmody commit 2717bdd4e8decf9a2f139c90d2653ed9dd316fa5 Author: Phil Carmody Date: Fri Mar 7 11:45:03 2014 +0200 bot.pl: don't pass references to privmsg in peval Ensure we stringify, or we won't be able to do the substr() in privmsg without the warning: "Attempt to use reference as lvalue in substr at ../bot.pl line 1770." Signed-off-by: Phil Carmody commit 619383729e4d8c73ebf48ace4ed3f8660d6f6d88 Author: Phil Carmody Date: Thu Mar 6 18:07:47 2014 +0200 bot.pl: reverse logout logic If you're not logged in, this is just a failure to do a command as with any other command. The penalty is the real payload. Signed-off-by: Phil Carmody commit 56606d9c41dfca7ed4859dd0e10bbe08f6ba49d8 Author: Phil Carmody Date: Wed Mar 5 01:09:32 2014 +0200 bot.pl: canonicalise trailing semicolons in blocks Without them, emacs misindents, keep them all the same. Signed-off-by: Phil Carmody commit 37923db4f3a1114ab0f8333e13f0c7d0dd6b279a Author: Phil Carmody Date: Tue Mar 4 20:57:29 2014 +0200 bot.pl: make the +v count match the nick list length Nearly fixed in: commit 0e7a55fb42339b4d4e55813e3a35ff3e780d6588 Author: Phil Carmody Date: Mon Oct 10 14:01:26 2011 +0300 bot.pl: silence uninitialised value warning in +v line This final change was the obvious way to make the code perfect. I was reminded of this issue by: http://idle.quyo.de/patches/irpgbot.v3.1.2/irpgbot.v3.1.2+voice.patch but that patch is very clumsy in comparison. Signed-off-by: Phil Carmody commit 4e1aa81153e704dbeaaa98b5058ce2a3e12f65e2 Author: Phil Carmody Date: Mon Mar 3 10:45:49 2014 +0200 bot.pl: fix dropped unique decay type mismatch When a unique is dropped, the level will be a string not a number. This causes a "not numeric" warning. Signed-off-by: Phil Carmody commit 0d8f539e4c4b9417a512c8418c6f8a2d44f3ceed Author: Phil Carmody Date: Sun Mar 2 16:20:15 2014 +0200 bot.pl: add inventory command Signed-off-by: Phil Carmody commit 07d3b08886e07742ae7a4561aa1df098a92971e3 Author: Phil Carmody Date: Sun Mar 2 16:07:37 2014 +0200 bot.pl: fix exchange_object critical bug Function name was wrong. Introduced here: commit 0e6f45fdad10f03a7214757f4a7f8e42932dc94d Author: Phil Carmody Date: Tue Feb 25 19:14:03 2014 +0200 bot.pl: dropped items - preparation - pick up left items Signed-off-by: Phil Carmody commit e801411fc1e609f7bc8641bc00d997f1ce6e4a03 Author: Phil Carmody Date: Sun Mar 2 16:00:54 2014 +0200 bot.pl: parameterise status code to cover both cases Signed-off-by: Phil Carmody commit 1cd45d50d4690a1df9fc9dfbacb8aaebce4aaaca Author: Phil Carmody Date: Sun Mar 2 15:55:28 2014 +0200 bot.pl: fix help for gender command Signed-off-by: Phil Carmody commit 774367e121dcb67148cc886fc4a1ba473446eb9f Author: Phil Carmody Date: Wed Feb 26 21:45:43 2014 +0200 bot.pl: add the commit id to the version string in the info message FatPhil doesn't do releases /per se/ yet, so the commit id is all that really matters. Signed-off-by: Phil Carmody commit 891b759526d29d7e5522f71db2781b5a339f5fe1 Author: Phil Carmody Date: Wed Feb 26 21:37:32 2014 +0200 bot.pl: make current hash visible Leave undefined if not version checking, but otherwise, let the value be visible to the rest of the code. Signed-off-by: Phil Carmody commit 210b8d41cb17865b547af0b0fcb9f7e63210cb92 Author: Phil Carmody Date: Wed Feb 26 21:36:46 2014 +0200 bot.pl: fix description of current item when rejecting new one Lost the unique info. Signed-off-by: Phil Carmody commit b3e58592fbe050bb40e6ac83c5ac44c4d58b05ab Author: Phil Carmody Date: Wed Feb 26 21:11:12 2014 +0200 bot.pl: make itemlevel debug helper also recognise uniques -> itemlevel 8 86 <- itemlevel(8,86) = linux 3.33 OS -> itemlevel 86b <- itemlevel(8,86b) = level 86 Linus's final bug-free Ready for the Desktop version of linux OS Signed-off-by: Phil Carmody commit e3eed6e75a89c366468ad67602d56a4e7a0d9aa5 Author: Phil Carmody Date: Wed Feb 26 15:14:26 2014 +0200 bot.pl,irpg.conf: settable frequency of top players list Defaults to 36000s (10 hours), but can be set to a different value in the config file. Suggested-by: stdhell (stderr) on #Soylent Signed-off-by: Phil Carmody commit 6a069ba918e271f7f9118cad425d044afddaf676 Author: Phil Carmody Date: Wed Feb 26 13:50:21 2014 +0200 bot.pl: make rpreport periods more flexible Adding selfclock wasn't a fair representation of the amount of time that had elapsed, as some of the jobs took time. Therefore add real elapsed time rather than theoretical elapsed time. This makes the residue modulo the various periods able to wrap past 0 without being 0. So just throw away the fractions, and look at how many big steps have been made. Based-on: http://idle.quyo.de/patches/irpgbot.v3.1.2/irpgbot.v3.1.2+skew.patch by Markus John [johm@quyo.de], Christian Schuster [blackout@s2000.ws] But unlike their "look for the fractional part to go backwards" method, mine has no failure modes. Signed-off-by: Phil Carmody commit 37cd2a41ab1a982bc5c013da12695efad975a821 Author: Phil Carmody Date: Tue Feb 25 19:17:45 2014 +0200 bot.pl: dropped items - actually drop things Two cases of taking a new better item in hand and dropping the old one. One case of simply dropping a crummy unwanted item. Signed-off-by: Phil Carmody commit 53666ba46dc751440bbfee50ffd0a25acd738904 Author: Phil Carmody Date: Tue Feb 25 19:16:36 2014 +0200 bot.pl: dropped items - preparation - turn on decay Still, nothing can be dropped, so nothing happens. Signed-off-by: Phil Carmody commit aaeca7441f7d718a7097c18b9f00e8f7097bd2f6 Author: Phil Carmody Date: Tue Feb 25 19:15:12 2014 +0200 irpg.conf: dropped items - preparation - default disabled config options Even if you enable these, still nothing's dropped. Signed-off-by: Phil Carmody commit 0e6f45fdad10f03a7214757f4a7f8e42932dc94d Author: Phil Carmody Date: Tue Feb 25 19:14:03 2014 +0200 bot.pl: dropped items - preparation - pick up left items Nothing can yet be on a map, so this still does nothing. Signed-off-by: Phil Carmody commit ad2cbe92c4450b83dc4fa4ee45bd5c9b162c7d37 Author: Phil Carmody Date: Tue Feb 25 19:11:13 2014 +0200 bot.pl: dropped items - preparation - load and save code In the absense of config options, these will return without doing anything. Signed-off-by: Phil Carmody commit d044e58e0a152121803bb320317f019395b70585 Author: Phil Carmody Date: Tue Feb 25 19:08:39 2014 +0200 bot.pl: dropped items - preparation - helpers to manage the hash Not called yet from anywhere. Signed-off-by: Phil Carmody commit abd587646000f25b6a8bc2eaacede4a9b4952f6a Author: Phil Carmody Date: Tue Feb 25 19:03:15 2014 +0200 bot.pl: remove unused dropped junk items code Gonna replace it with something functional. Signed-off-by: Phil Carmody commit 892806fc8658c49aad53ceee0b2f8d1b3342fd4f Author: Phil Carmody Date: Tue Feb 25 18:53:09 2014 +0200 bot.pl: fix silly extra recursion in itemsum No point calling the function twice back to back. Signed-off-by: Phil Carmody commit 03d362e379e8b9e1249cb587e74784c4a368d710 Author: Phil Carmody Date: Tue Feb 25 18:47:58 2014 +0200 bot.pl: pull item level->value conversion into a helper function Signed-off-by: Phil Carmody commit 5f4856c2fc44a92637172dbddd558d4f0419f0ee Author: Phil Carmody Date: Tue Feb 25 02:03:31 2014 +0200 bot.pl: move complex penalty calculation into common path No point repeating the expression everywhere. Signed-off-by: Phil Carmody commit 6d21754423629e0e92eb753a5ba0811a2099c357 Author: Phil Carmody Date: Tue Feb 25 02:01:22 2014 +0200 bot.pl: add ttl helper to calculate times Based-on: http://idle.quyo.de/patches/irpgbot.v3.1.2/irpgbot.v3.1.2+ttl.patch by Markus John [johm@quyo.de], but that patch has an error in that it calculates the previous level's delay, not the coming level's delay. It therefore changes the code. My patch does not change the behaviour of the code. Signed-off-by: Phil Carmody commit dfce34026fc5a1cc9097d8705261cffc1b9b2d39 Author: Phil Carmody Date: Tue Feb 25 01:04:16 2014 +0200 bot.pl: move local variable $ulevel into tighter scope in find_item Signed-off-by: Phil Carmody commit fff3594a5a51a3bc3c56035c1cb43f9f4111a3f6 Author: Phil Carmody Date: Tue Feb 25 00:12:24 2014 +0200 bot.pl: permit config file to have solitary keys with no value Based-on: http://idle.quyo.de/patches/irpgbot.v3.1.2/irpgbot.v3.1.2+config.patch by Christian Schuster [blackout@s2000.ws] Signed-off-by: Phil Carmody commit 911392a8a1abf5a6736751d741d4ff555999d9c0 Author: Phil Carmody Date: Tue Feb 25 00:11:35 2014 +0200 bot.pl: move local vars into a smaller block key and val are only used inside the block, move them there. Signed-off-by: Phil Carmody commit 802d6dac32a6b4d474f474714dca8962f82830c8 Author: Phil Carmody Date: Tue Feb 25 00:08:14 2014 +0200 bot.pl: fix uninitialised variable bug in ha() Can't interpolate an undef into a string without a warning. Signed-off-by: Phil Carmody commit b2c8b38056f8d86c6533b9bf33cd0079b628dc5b Author: Phil Carmody Date: Tue Feb 25 00:01:54 2014 +0200 bot.pl: fix horribly verbose unique item description in modify Would use the full description, which is just noise in that context. Issue was introduced in commit a76002565e9eb25b3f7b682e5b2a02aa2324289c Author: Phil Carmody Date: Thu Feb 9 21:11:37 2012 +0200 bot.pl: modify_item names unique items Signed-off-by: Phil Carmody commit faf8532f55255dc631207eb0ab7e54deeeb52fb7 Author: Phil Carmody Date: Tue Feb 25 00:00:16 2014 +0200 bot.pl: move change strings into smaller blocks One's used in one half of the if, the other's used in the other. Move them there. Signed-off-by: Phil Carmody commit 2ba8be4dc2d56a11518851660b33908e57eb2baf Author: Phil Carmody Date: Mon Feb 24 23:19:16 2014 +0200 bot.pl: fix nick length change error The old name must be replaced, the length being used in the substr was the new length. The s/// operator's a much easier way to fix this. Based-on: http://idle.quyo.de/patches/irpgbot.v3.1.2/irpgbot.v3.1.2+nick.patch by Christian Schuster [blackout@s2000.ws] Signed-off-by: Phil Carmody commit 457cce76d7889c5b1927ced9f5aa62a41c518af6 Author: Phil Carmody Date: Mon Feb 24 19:06:02 2014 +0200 bot.pl: tweak a/an article usage Most obvious when saying "A 8-year old vintage gueuze", etc. Regexp was a hacked-down version of the logic in: http://search.cpan.org/dist/Lingua-EN-Inflect/lib/Lingua/EN/Inflect.pm#PROVIDING_INDEFINITE_ARTICLES Signed-off-by: Phil Carmody commit 398481bab24d0287effb55d5d6e6f43d6c729b85 Author: Phil Carmody Date: Mon Feb 24 18:27:01 2014 +0200 beer: remove .irpg.conf It should never have been in the repo in the first place. Signed-off-by: Phil Carmody commit f5ba74910c9bbf012c992d1d26cc61f07c8d8e2c Author: Phil Carmody Date: Mon Feb 24 18:04:17 2014 +0200 nerd/events.txt: add SN-suggested calamity LKML Suggested-by: Landon on #Soylent Coffee Suggested-by: mattie_p on #Soylent Signed-off-by: Phil Carmody commit 9d8aa98b113fa660d9966916cb387a290e16f386 Author: Phil Carmody Date: Mon Feb 24 17:54:28 2014 +0200 bot.pl,events.txt: configurable evilness event Signed-off-by: Phil Carmody commit b9497ab9c797d4468e727f91ed3293531c3b4a22 Author: Phil Carmody Date: Mon Feb 24 17:46:10 2014 +0200 bot.pl: use rewrite helper in holiness rename local variable to something less clumsy in the process. Signed-off-by: Phil Carmody commit d2974bd9bbf23a02114558b214564ab71a5d7878 Author: Phil Carmody Date: Mon Feb 24 16:14:44 2014 +0200 bot.pl: fix unique message config The players' alignments are lower case. Signed-off-by: Phil Carmody commit 5250399e9da0750f91a9a92e8cb227f5cde64473 Author: Phil Carmody Date: Mon Feb 24 15:25:26 2014 +0200 bot.pl: merge all item swapping instances with a parameterised message Signed-off-by: Phil Carmody commit a822b257afeef6988e7f7885a358a2242c89e813 Author: Phil Carmody Date: Mon Feb 24 15:12:57 2014 +0200 bot.pl: fix rewrite helpers "" isn't a valid index, but we can prefix all numbers with a 0. Signed-off-by: Phil Carmody commit 42f8c00ec2b901bea5c9761c8c8bb669b7eb8459 Author: Phil Carmody Date: Mon Feb 24 14:54:17 2014 +0200 bot.pl: create rewrite helpers This makes it easier for more strings to be parameterised, and interpolated consistently. Signed-off-by: Phil Carmody commit fd036beb82744ad1b51c03b7f5d89fe8cfa3c6a3 Author: Phil Carmody Date: Mon Feb 24 14:19:51 2014 +0200 nerd/events.txt: fix ambiguous %her% %her% matches the posessive (his/her/their) first, so can't be the object (him/her/them) as well. Signed-off-by: Phil Carmody commit d6dc22bbdbc555fe42dbe903dc71b9f1e8b45b97 Author: Phil Carmody Date: Mon Feb 24 13:27:00 2014 +0200 bot.pl: refactor swap_items functionality There's another swap, not related to fights, but that requires changing the message. Signed-off-by: Phil Carmody commit af6f91c9058d1221a8270b605f556c1e797d1333 Author: Phil Carmody Date: Mon Feb 24 12:41:53 2014 +0200 nerd/events.txt: a couple more calamities shock sites Signed-off-by: Phil Carmody commit 47d328d40a5b63a91221fee3c5e7af8777b9fa05 Author: Phil Carmody Date: Mon Feb 24 12:02:14 2014 +0200 nerd/events.txt: 3 different unique acquisition messages Signed-off-by: Phil Carmody commit 15be41166c84648f9c09396618135a31cf0d99c9 Author: Phil Carmody Date: Mon Feb 24 11:52:00 2014 +0200 bot.pl: truncate unique descriptions Except when they're first handed out. Is this an improvement? Signed-off-by: Phil Carmody commit 16653f69fff0bcd71d97b3c0f60561d9e0cc71bb Author: Phil Carmody Date: Mon Feb 24 11:47:33 2014 +0200 nerd/items.txt: improve grammer of uniques They have to be able to follow "his " and "a "; Signed-off-by: Phil Carmody commit db793e9506c2b2540ceaf15e53a327e4a6790c9a Author: Phil Carmody Date: Mon Feb 24 11:23:48 2014 +0200 bot.pl/events.txt: pull unique object message out to events file Default secular message is terribly neutral, but you can now customise the message for the three different alignments. UG, UN, and UE prefix the three. U can be used to define all three in one go. Signed-off-by: Phil Carmody commit d8d81030bf5f0054546bbb4d2025eec7e1dd5c9c Author: Phil Carmody Date: Mon Feb 24 11:10:34 2014 +0200 nerd/items.txt: add some more uniques Removed 'p2', alas, as most people didn't work at Nokia! Signed-off-by: Phil Carmody commit 1c575b7f2733f13c62b6f6ae4e85d9c13d1a63f0 Author: Phil Carmody Date: Sun Feb 23 18:04:17 2014 +0200 bot.pl: let unique_notice know who the user affected is That way it can modify what it says depending on gender/alignment Signed-off-by: Phil Carmody commit c56661efe5ddc0167f9f074058cd316cb04efccf Author: Phil Carmody Date: Sun Feb 23 17:41:44 2014 +0200 bot.pl: add a gender-aware were() helper - he/she/it was, they were. Signed-off-by: Phil Carmody commit 5ebf6cd8c1fb49d9c0f2e69db82d25ada3da92fc Author: Phil Carmody Date: Sun Feb 23 17:33:46 2014 +0200 bot.pl: simplify item swapping code (fights & stealing) In the process, make sure we use the most powerful helpers available to simplify the code. Note - two chunks of code now become identical. Signed-off-by: Phil Carmody commit 8ba3ef416e3da896b6fe69baa3e080be90185e25 Author: Phil Carmody Date: Sun Feb 23 16:53:01 2014 +0200 beer/events.txt: expand the calamities Signed-off-by: Phil Carmody commit 0863148644b38d010c0b25a5be4d8d68e780581e Author: Phil Carmody Date: Sun Feb 23 16:52:16 2014 +0200 nerd/events.txt: Add some holiness events - FSM themed Signed-off-by: Phil Carmody commit 8c79a317a1bac78dda55f0e63d1a40075f26d519 Author: Phil Carmody Date: Sun Feb 23 16:40:28 2014 +0200 beer/events.txt: add a holiness event Signed-off-by: Phil Carmody commit 028dee2b282246fc1eef729561804491bbfdcc3a Author: Phil Carmody Date: Sun Feb 23 16:35:06 2014 +0200 bot.pl,events.txt: move fantasy holiness into events file Put a non-descript holiness as the default. Signed-off-by: Phil Carmody commit 43e1f6664afe0682c2ec3e28ca30f9a21509a87d Author: Phil Carmody Date: Sun Feb 23 16:08:31 2014 +0200 bot.pl: extract holiness message into parametrised global variable This way we can overwrite it from the config file. Signed-off-by: Phil Carmody commit fedcae1b7b91a2d33394ddc681b2178ef21a2603 Author: Phil Carmody Date: Sun Feb 23 15:18:10 2014 +0200 bot.pl: rename goodness to holiness Going to bubble goodness and evilness into the events file. Therefore need 2 unclaimed letters, and G's taken. so H and E they will be. Signed-off-by: Phil Carmody commit c0360a0bd22b1927164d14a454a657ce6b8fdab2 Author: Phil Carmody Date: Sun Feb 23 14:18:08 2014 +0200 nerd/events.txt: A few more modern nerdy calamaties and godsends Signed-off-by: Phil Carmody commit 0c108a08f99842d63c170a68a962186d9d088c08 Author: Phil Carmody Date: Fri Feb 21 17:36:30 2014 +0200 bot.pl: don't hassle original website over our updates Currently, this just checks commit ids, and says if you're matching FatPhil's published tree or not. It's up to you to work out how you differ. Signed-off-by: Phil Carmody commit 85e68a304c074ca9e1228f56de6f0557ff65a74a Author: Phil Carmody Date: Fri Feb 21 13:29:14 2014 +0200 nerd: items.txt - fix OS list Signed-off-by: Phil Carmody commit 2398ed6903a1392c826689981090ce1d44dd0893 Author: Phil Carmody Date: Thu Feb 20 23:52:33 2014 +0200 irpg.conf: fix the line for daemonization Signed-off-by: Phil Carmody commit bfff614f5c561f4b7e759e8f23a1aeeb0cf046b3 Author: Phil Carmody Date: Thu Feb 20 21:50:56 2014 +0200 bot.pl: add 'daemonize' option Defaults to not daemonizing, but if it's in either the conf file or the commandline, then it will daemonize. Either way, there's a clear message on the console telling you which it will do. Signed-off-by: Phil Carmody commit 1f9a87723f31e1872bb01425fa4f5f3905e03fd7 Author: Phil Carmody Date: Thu Feb 20 21:26:23 2014 +0200 bot.pl: make first thing said about number of users actually make sense It was being interpreted as something to do with reading users from the db file, but it's not, it's only about automatically logging them in. Signed-off-by: Phil Carmody commit 94e1c3871c8f3e5598542eae697fb0bf73b38e94 Author: Phil Carmody Date: Thu Feb 20 21:16:27 2014 +0200 bot.pl: Combine 2 almost identical log messages Signed-off-by: Phil Carmody commit 3513c34bbc2bef836fedc9c91c0fa37f739a9f48 Author: Phil Carmody Date: Thu Feb 20 14:40:27 2014 +0200 nerd/events.txt: new Q1 quest, another riot Signed-off-by: Phil Carmody commit bd9c3f0a3d5d0cfad5128f685400b959bb91d51b Author: Phil Carmody Date: Thu Feb 20 12:40:37 2014 +0200 nerd/events.txt: fix typo in event Signed-off-by: Phil Carmody commit e2a0eec9936b61fc13fc0398652b22b31c0af320 Author: Phil Carmody Date: Thu Feb 20 11:58:20 2014 +0200 nerds/events.txt: freshen some events, adding more /. and SN references Signed-off-by: Phil Carmody commit 4395abf051e4ef210d092f1c6cb22e6c0713c8c6 Author: Phil Carmody Date: Thu Feb 20 11:38:18 2014 +0200 nerds/items.txt: fix OS list, was missing a comma Signed-off-by: Phil Carmody commit 84215d48513d67046f18b9059aca7943471322e9 Author: Phil Carmody Date: Thu Feb 20 03:58:50 2014 +0200 bot.pl: fix uninitialised values bug with backward compatibility DBs my @i shadowed the real @i, jaiks! no point having $style uninitialised. Signed-off-by: Phil Carmody commit 01cdce67bfea70aae9a9f4abed3a1d21d8378bf9 Author: Phil Carmody Date: Thu Feb 20 00:11:22 2014 +0200 nerd: use linux 3.x as infinite tail Signed-off-by: Phil Carmody commit a365697f4ad8680c81aa66e6481a9519a001ff5b Author: Phil Carmody Date: Sat Feb 11 18:05:56 2012 +0200 bot.pl: rename item_level to item_describe It doesn't get the level, it describes the item at that level. Signed-off-by: Phil Carmody commit c572b73908b4a0955a4083c74268c1bcb7760600 Author: Phil Carmody Date: Sat Feb 11 18:02:14 2012 +0200 bot.pl: migrate to user_item and user_item_level helpers Reduce direct use of the {item} array. Only half done... Signed-off-by: Phil Carmody commit dfe92569f4b9508a220faa68da4f2d681eff8c44 Author: Phil Carmody Date: Sat Feb 11 04:00:16 2012 +0200 bot.pl: rename user_item_level to user_item_val 'level' is used in too many contexts, so try to avoid another. Signed-off-by: Phil Carmody commit 213fde592d6a6a470dd8b230efdecf84a640b8e1 Author: Phil Carmody Date: Sat Feb 11 03:57:40 2012 +0200 beer/items: add unique level to shipwrecked beer description More descriptive that way - 'level' is lame. Signed-off-by: Phil Carmody commit aa91df536ebf4247ee009039fa4a263065d86c88 Author: Phil Carmody Date: Sat Feb 11 03:24:46 2012 +0200 bot.pl: user_item and user_item_level helpers Get the item (level+optional suffix), or just the level, for a given user's given typeid. Signed-off-by: Phil Carmody commit 42c6a2d6fc565223a31f8f73e3e991332e155c8b Author: Phil Carmody Date: Sat Feb 11 03:10:06 2012 +0200 bot.pl: item_level split into helper and wrapper The helper just does plain items the traditional way. The wrapper called either the plain helper or the unique helper depending on whether the level has a unique suffix. Signed-off-by: Phil Carmody commit cffcf840eafeef6ead9829c39029bd6f9f6745ea Author: Phil Carmody Date: Sat Feb 11 03:08:54 2012 +0200 bot.pl: unique_level helper to describe uniques Akin to item_level. Eventually will be called by item_level, so all things are consistently named. Signed-off-by: Phil Carmody commit a2bfde538c1512f9fea28e67cb549b914cbd01d6 Author: Phil Carmody Date: Sat Feb 11 02:56:10 2012 +0200 bot.pl: map from unique suffix to position in array This lets us go in both directions. It might be more sensible to have the array as a list of suffices, and then use the suffix as a key to the hash, but this works too, and is a simple change. Signed-off-by: Phil Carmody commit 06a11107a29ffcedb380788c6a7e5eb4c7b8ad66 Author: Phil Carmody Date: Sat Feb 11 02:25:19 2012 +0200 beer/items: include unique level in description of hop extract 'level foo' is lame, let's use the number as an IBU. Signed-off-by: Phil Carmody commit 7a6f3c76ba834f206fbffc4862a4916e838ce79e Author: Phil Carmody Date: Sat Feb 11 02:22:02 2012 +0200 nerd/events: include deathstation level in its model name Let the model number itself signify the level. Signed-off-by: Phil Carmody commit 7d619f942d2029171fb8ef68847527644625135b Author: Phil Carmody Date: Sat Feb 11 02:18:21 2012 +0200 bot.pl: stop unique_notice redundantly including ulevel If it finds a %ulevel% in the description, then there's no need to say "level %_[1]", it's redundant. Signed-off-by: Phil Carmody commit 0a620b13a3d155cc588a88d478cbe375f40e9ee9 Author: Phil Carmody Date: Thu Oct 6 17:07:42 2011 +0300 debug: bot.pl - disable daemonisation Signed-off-by: Phil Carmody commit d84b394e1d41c21873f05be1a9c10a86468aa97f Author: Phil Carmody Date: Thu Feb 9 23:03:51 2012 +0200 beer/items: add some calamaties and godsends First hack, pretty crappy, but better than nothing. Signed-off-by: Phil Carmody commit b212f11ff37a4a011802d4f7a46b8588a1e0a429 Author: Phil Carmody Date: Sun Jan 8 03:42:22 2012 +0200 beer: HACK - first stab at items, events, and a config file WILL NEED FIXING, the speed is way way too high in the conf files, and the grammar is bollocksed up in a lot of the items. The ability to understand the new style [ items ] save file is recent. Make use of it by stubbing out the ones we can't get to make sense. Signed-off-by: Phil Carmody commit 9d4ad839d223dbb30ac1f12d0221f18e325a0924 Author: Phil Carmody Date: Thu Feb 9 23:15:30 2012 +0200 bot.pl: better tracking of whether items have calamaties/godsends Used to be a boolean flag, now's two bit flags. Purely cosmetic at the moment. Signed-off-by: Phil Carmody commit a66410ae44412576a9a1854e1f584ac9d289d8ff Author: Phil Carmody Date: Thu Feb 9 23:13:11 2012 +0200 bot.pl: defend against empty @fragileitems Simply don't enter that block if there's never any chance of any item ever being modified. Note, however, that the case of a person not having such an item isn't considered. Signed-off-by: Phil Carmody commit b1c4e5dcd9ee0862665299c1b82d71b59f926a89 Author: Phil Carmody Date: Thu Feb 9 23:09:55 2012 +0200 bot.pl: add an 'event' command for superadmins Just like the 'hog' command, it can bring about events, using modify_item(). Takes the parameter 'good' or 'bad', and randomly selects in the absence thereof. Signed-off-by: Phil Carmody commit a76002565e9eb25b3f7b682e5b2a02aa2324289c Author: Phil Carmody Date: Thu Feb 9 21:11:37 2012 +0200 bot.pl: modify_item names unique items Previously it would just be the type. Now we can name uniques. Signed-off-by: Phil Carmody commit 4080f3ee1f2d36fd5bcd783361e8f308668fd1ff Author: Phil Carmody Date: Sat Jan 14 19:24:08 2012 +0200 bot.pl: moveplayers - cleanup after previous changes Indenting was wrong for a start, due to silly if(1) that was there deliberately there in order to avoid indentation changes. Now's the time to clean that up. Signed-off-by: Phil Carmody commit 2b4518b76fe9244369a041080ba7ac4587e4c087 Author: Phil Carmody Date: Mon Jan 9 04:17:08 2012 +0200 bot.pl: item list is no longer a constant length of 10 Changes the save file format. Risky... Signed-off-by: Phil Carmody commit 6937282cea75cc6c9434b7a51507a70c1f190202 Author: Phil Carmody Date: Mon Jan 9 14:20:24 2012 +0200 bot.pl: starting to clean up player db read/write Stuff was done clumsily, make it simpler. Signed-off-by: Phil Carmody commit 67b4f5e001606bf843e6600ae3d71e5849ee0f6f Author: Phil Carmody Date: Sat Jan 7 23:09:56 2012 +0200 bot.pl: moveplayers - cache online list for later use Signed-off-by: Phil Carmody commit e8fd54d609a6a22c8520ce7f2f81d83eb005a5dd Author: Phil Carmody Date: Sat Jan 7 23:00:51 2012 +0200 bot.pl: moveplayers - extract other player movement into helper It's called from 2 places with almost entirely identical behaviour. Abstract that into a helper function. Signed-off-by: Phil Carmody commit 01aa5c90126049eb16c655d30ea7f50e0a8c1197 Author: Phil Carmody Date: Sat Jan 7 20:59:38 2012 +0200 bot.pl: moveplayers - cache the questers list Used repeatedly when there's a q2 quest, and having a default of () means that it can be subtracted from the player list if there's no type 2 quest in progress. This aims towards merging the repeated code blocks. Signed-off-by: Phil Carmody commit dbb9dd86dd39517bd67f1305ca7fd753b9ddf035 Author: Phil Carmody Date: Sat Jan 7 20:54:00 2012 +0200 bot.pl: moveplayers - always move other players Previously, if type 2 questers had achieved something major, then the other players wouldn't move at all. Signed-off-by: Phil Carmody commit 6eb8a0abb678df408761fc6c15cbf3bf24fa2dd5 Author: Phil Carmody Date: Sun Jan 8 16:33:16 2012 +0200 bot.pl: make quests restorable The save file's nearly useless, it only helps the web page, and even then it's sometimes wrong. Fix that - make it restorable, and always correct. Signed-off-by: Phil Carmody commit c93230f374e5e5c9ca0f519f8b11b6df0d5917dd Author: Phil Carmody Date: Sat Jan 7 20:46:50 2012 +0200 bot.pl: preparation before cleaning up moveplayers People on quests don't take part in the other players' encounters, so it doesn't matter if we move them before or after other players. Signed-off-by: Phil Carmody commit 3f5ed5c635032bc3b534158243f91bbb054848f7 Author: Phil Carmody Date: Sat Jan 7 05:23:54 2012 +0200 bot.pl: stubbed version of junk management All we do is limit the list to 10, but never actually add anything to the list. Signed-off-by: Phil Carmody commit ae6618c141ae3beaa9a317271e15f865123b9aa4 Author: Phil Carmody Date: Thu Feb 9 23:03:05 2012 +0200 events.txt: fix punctuation Signed-off-by: Phil Carmody commit 58e94f970feb97999c2e60589148cce2ebc1f9ab Author: Phil Carmody Date: Fri Jan 6 22:16:52 2012 +0200 bot.pl: quest testing fixed Stop undefined variable errors since we make quests come from files, and where the time was uninitialised for type 2 quests. Signed-off-by: Phil Carmody commit 676d2261a6aefa11181de74b3058a8ba7769dd09 Author: Phil Carmody Date: Tue Nov 29 21:15:10 2011 +0200 bot.pl: items - numeric progressions retain precision In the past, itemlevel(6,102) = A 6.99999999999999 GHz processor Restrict the number of decimal places to that of the current delta (so 0.05#+.1# will not do what you expect). Signed-off-by: Phil Carmody commit b0198988ce1752eda0619007ac8c91300d54e6f7 Author: Phil Carmody Date: Mon Nov 21 13:52:13 2011 +0200 bot.pl: cosmetic move socket-related vars together Just in case we want to connect to multiple servers. Signed-off-by: Phil Carmody commit eae42fccdddd15a1c3a13315776ef92993f86687 Author: Phil Carmody Date: Fri Sep 30 01:36:04 2011 +0300 nerd/events.txt: first hack - various calamities/godsends/quests Not quite as many godsends as I'd like. Win/Lose events for the hand of god to use. Includes selection lists and numerical macros (perhaps a bit OTT): E.g. "G learnt %{LUA|python|perl|ruby}%" Signed-off-by: Phil Carmody commit ec3ee0dc76ae53088b3d27003b0eb976b6a5d80e Author: Phil Carmody Date: Sat Jan 7 01:51:48 2012 +0200 nerd/items: a unique monitor Signed-off-by: Phil Carmody commit 3ddc06aed4e518fbf2be418766c3380d9a245ca5 Author: Phil Carmody Date: Fri Sep 30 01:07:36 2011 +0300 nerd/items.txt: first stab at items, and 3 uniques Some initial ideas, not necessarily final. Monitors of different types and sizes. Modems complete with ITU standards where appropriate. Hard disks just grow in size. Processor speeds just increase in clock frequency. Signed-off-by: Phil Carmody commit ecf0226647947a547b9bd9b6646934b0bbc04ab5 Author: Phil Carmody Date: Sun Oct 30 23:27:45 2011 +0200 bot.pl: events - enable numeric macros in events As the changes can be to a random extent, let the numeric part of the message also be random. So you can now have events like: W Malcolm McLaren really likes %player%'s %{5##12}%" mohawk, so pushes %him% Then a small push would correspond with 5", and a large push would be 12#. The optional 3rd parameter species the step size, which defaults to 1 and is necessary for fractional or large steps, or a range that decreases, e.g.: C has been given a grade %{5#-1#1}% crew-cut Where grade 5 is minor, and grade 1 is the biggest calamity. Item events currently aren't parametrised by a random number, they're always 10% up or 10% down, so there's no need for a parameter. Make it undef to trap any accidental erronious use of the macro in that context. Signed-off-by: Phil Carmody commit 2c4fd21f2fac4a66c4d9f1afa26ce0ea34308e53 Author: Phil Carmody Date: Wed Oct 12 23:51:40 2011 +0300 bot.pl: admin command for a new quest If there's no current quest, may as well permit an admin to start one. Signed-off-by: Phil Carmody commit 6a3be8e5be7285787c71152f12e9cfb0bb83aeec Author: Phil Carmody Date: Mon Oct 24 17:08:12 2011 +0300 bot.pl: events - enable selection lists for more variation So rather than lots of different "G learnt LUA" events, we can have "G learnt %{LUA|python|perl|ruby}%" Signed-off-by: Phil Carmody commit 0e7a55fb42339b4d4e55813e3a35ff3e780d6588 Author: Phil Carmody Date: Mon Oct 10 14:01:26 2011 +0300 bot.pl: silence uninitialised value warning in +v line The final message tries to interpolate undefs. Fix that by saving exactly what was spliced out, and interpolating only that. Signed-off-by: Phil Carmody commit 26fe5aeaba02824094566051251528fd25480527 Author: Phil Carmody Date: Sat Jan 14 19:01:37 2012 +0200 bot.pl: rewrite_event - understand %he% etc. We had the helper function, we just weren't using it. Signed-off-by: Phil Carmody commit d37b6fde63f55983489352f8f5280bcbbf955144 Author: Phil Carmody Date: Sun Jan 8 01:25:30 2012 +0200 bot.pl: item_level told about indefinite articles You don't want to find "a 6 place ratings", so have a special marker that says "drop any leading article. That means item_level needs to know if there's an article needed before the item level. Add it as a parameter, and remove it if the level has a !a marker. Note: this might not have any use at all, as I don't think I can get simple counters to work without lots of work. Signed-off-by: Phil Carmody commit fc638879aa25a8ade3b548e1c5bff55e81bad061 Author: Phil Carmody Date: Wed Nov 2 13:32:09 2011 +0200 bot.pl: debug - itemlevel query Helps diagnose situations like "You found a monitor!" Signed-off-by: Phil Carmody commit 26380bf65680b49b19043ef0c69c8e5ff294cea4 Author: Phil Carmody Date: Sat Dec 31 10:58:55 2011 +0200 bot.pl: log more iten events Acquisition of uniques, and picking up items, wasn't logged. Signed-off-by: Phil Carmody commit 7beb3648261e776cfc9ab5b651a2124fdad50a0f Author: Phil Carmody Date: Thu Oct 6 16:50:07 2011 +0300 bot.pl: add genders to each character Get rid of polite 'them'/'their' wording by letting each character have a gender. m=male, f=female, u=unknown (so uses 'they'), n=newter, and pc=politically correct he/she/it as an easter egg. Start to parametrise some of the messages to use this information. Signed-off-by: Phil Carmody commit a4c026728ba908c4d6d4c91610aecabd74637948 Author: Phil Carmody Date: Tue Oct 4 16:04:02 2011 +0300 bot.pl: item levels - support lists, including counters Best explained with an example. In items.txt, include names for the levels: To sequence through linux 2.0, linux 2.1, linux 2.2, linux 2.3, linux 2.4, linux 2.5, linux 2.6.0, linux 2.6.1, ..., then there are 2 options: The dumb way: item1: n="OS" levels1: linux 2.0, linux 2.1, linux 2.2, linux 2.3, linux 2.4, linux 2.5, linux 2.6.0, linux 2.6.1, ... (and those ... mean you have to type the whole thing out) The smart way: item2: "OS" levels2: linux 2.%{0#+1#5}%, linux 2.6.%{0#+1}% The %{start#delta#end}% notation may also have * rather than +/- as the operation in the delta, but be warned that exponential growth is dangerous. Signed-off-by: Phil Carmody commit c7d4feb81d18aaaba772f5b050eefd057cb29aab Author: Phil Carmody Date: Tue Oct 4 04:08:11 2011 +0300 bot.pl: item level abstraction 'level XX' is a very lame description for most object types. Pull the string into a helper function so that it can be changed in one place. No changes to behaviour. Signed-off-by: Phil Carmody commit 831be07e8188c4a41a111de138c4dc2ed870f6ca Author: Phil Carmody Date: Tue Oct 4 17:04:59 2011 +0300 bot.pl: events - quick debug line saying what you read Number of each type of event are good to know. Signed-off-by: Phil Carmody commit ef17e6e41aa2dbf88ca355fd8a21552c0681f4d6 Author: Phil Carmody Date: Tue Oct 4 01:16:34 2011 +0300 bot.pl: events - read from the events file As they're in arrays, we can just use random access to them. Remember to reread on rehash. All events are in arrays under a hash indexed by the letters 'W'/'L' for winning/losing, and 'G'/'C' for godsend/catastrophe. Move the built-in hog events to the events file. Also template them so that the player's name can be substituted in arbitrarily many times. Simplify and make the hog() function more data driven. Signed-off-by: Phil Carmody commit 2ddf49e68df4227847917e99e65a2a469db0ded5 Author: Phil Carmody Date: Fri Sep 30 00:09:13 2011 +0300 irpg.conf: point to default items file from conf file Signed-off-by: Phil Carmody commit b8214f514ed6c0410e450ddd013e417d43568d58 Author: Phil Carmody Date: Fri Sep 30 00:07:04 2011 +0300 bot.pl,items.txt: pull all data about items into a file That way, we can change the game without changing code. Must remember to reread on rehashing the game live. Signed-off-by: Phil Carmody commit af96e227335239959c558864b6b83dbe94470edc Author: Phil Carmody Date: Mon Oct 31 17:32:19 2011 +0200 bot.pl: don't initialise typeid/type until we know they're needed No point wasting time and entropy if we do pick a unique item. Signed-off-by: Phil Carmody commit 025698355a905b95d21e92fa67fd6be748737825 Author: Phil Carmody Date: Thu Sep 29 20:10:06 2011 +0300 bot.pl: migrate {item} hash to being an array This removed the dependency on type names to access it. Now it's just a number, and we have to look elsewhere to turn that number into an item name. Signed-off-by: Phil Carmody commit 1624ea94cbe7eaa3ee184b23c604455f42b26528 Author: Phil Carmody Date: Tue Oct 25 22:20:18 2011 +0300 bot.pl: change type 2 quest movement logic Previously you'd head down the diagonal until you hit the right row or column, and then you'd head in a straight line. Now, you always move in the axis you're most distant on, and only randomly move in the axis you're closer on, based on the ratio of the two distances. Basically like a randomised Bresenham. The path ends up mostly straight, but with a slight wobble. Much closer to how you might cross terrain. Signed-off-by: Phil Carmody commit fb521cf59ae22523f75caf20263275719c998c87 Author: Phil Carmody Date: Tue Oct 25 21:25:27 2011 +0300 bot.pl: simplify quest movement and end testing Remove duplicate code. Simplify long-winded constructs. Signed-off-by: Phil Carmody commit 703c0732a29c00092d074e8ded699ab835821cf5 Author: Phil Carmody Date: Tue Oct 11 21:07:05 2011 +0300 bot.pl: simplify logged channel messages Just use a helper function that does both sending to the channel and saving to the log. Signed-off-by: Phil Carmody commit e229267b65d1e369f5a187e636dc93bb9c027ea4 Author: Phil Carmody Date: Thu Sep 29 19:43:29 2011 +0300 bot.pl: make uniques a data-driven array To assist with pulling them out into a config file. Signed-off-by: Phil Carmody commit f204891039b77ae93ee2c87b640ac97a1ae743bc Author: Phil Carmody Date: Thu Sep 29 18:34:45 2011 +0300 bot.pl: close files after use Signed-off-by: Phil Carmody commit 1f9d99de4b2b9e0073d869660c65c0bb1383872b Author: Phil Carmody Date: Tue Oct 4 03:43:39 2011 +0300 bot.pl: whitespace changes when displaying event strings Detect leading "'s " and don't add a space in those cases. Signed-off-by: Phil Carmody commit f0279f50988876b0dce6bdb905f4da93a21a4679 Author: Phil Carmody Date: Thu Sep 29 19:49:37 2011 +0300 bot.pl: make modify_items safer against undefs Just keep looping until we find a change to make. In theory, there will never be an undef. If it's all undef, then we're screwed, so don't do that. Signed-off-by: Phil Carmody commit eaa701557f6123dbd064a46db2df860e970bd156 Author: Phil Carmody Date: Thu Sep 29 18:31:24 2011 +0300 bot.pl: merge godsend and calamity into one function Less to maintain. Some helper arrays for parametrising strings are needed. Signed-off-by: Phil Carmody commit 7b05cc02a0a1ae46409bfd8bdd71368013d6658e Author: Phil Carmody Date: Thu Sep 29 18:13:16 2011 +0300 bot.pl: cosmetic - make calamity and godsend functions the same Looking forward to collapsing them into just one function. Signed-off-by: Phil Carmody commit 01332771a17199e147fbc30c7fe84be90105d4f7 Author: Phil Carmody Date: Thu Sep 29 18:06:18 2011 +0300 bot.pl: pull calamities and godsends out into data So they can be configured from a file and the code won't change. Signed-off-by: Phil Carmody commit bfce417f1a487000c0b3e297c6168b6f712cfc8d Author: Phil Carmody Date: Thu Sep 29 20:47:50 2011 +0300 bot.pl: simplify the penalize function Pull out common code segments, and make things data driven. Signed-off-by: Phil Carmody commit df44c606bce7ed68700db1d634b5cc5c66384e79 Author: Phil Carmody Date: Thu Sep 29 17:13:49 2011 +0300 bot.pl: extract the item lists into arrays @items is a fixed list, and @fragileitems is a list of indices into @items. Preparation for pulling them out into an external file. Signed-off-by: Phil Carmody commit 664837029101ffe487c4c0497b160356fcd9899b Author: Phil Carmody Date: Thu Sep 29 16:54:30 2011 +0300 bot.pl: make some bot commands parametrisable %owner% can be expanded into some of them, and %botnick% in more than before. Signed-off-by: Phil Carmody commit 9e3af20d0130152cd2cb29a96c6dd356f8ac7908 Author: Phil Carmody Date: Thu Sep 29 15:26:00 2011 +0300 conf: move version controlled filename It's only an example, the user should be making his own copy anyway. Signed-off-by: Phil Carmody commit bc137be8189e092bffe8706c582540095caa35f8 Author: Phil Carmody Date: Thu Sep 29 15:24:59 2011 +0300 bot.pl: config filename centralised to a variable Signed-off-by: Phil Carmody commit e741c255414a43c4a26d3600c251a3a13daffa11 Author: Phil Carmody Date: Thu Dec 1 23:05:37 2011 +0200 bot.pl: fix evilness if there are no goods The grep returns (), and everything after that is full of undef. Signed-off-by: Phil Carmody commit f0f5889395ab1f4614569b6fa90c3baf2ee09492 Author: Phil Carmody Date: Fri Sep 30 02:35:59 2011 +0300 bot.pl: some changes were missing from the modifiers log When admins do a push, that's a change. Also, an item mod was missing from the log. Signed-off-by: Phil Carmody commit b73ba10fec06f34a2363bee034db3f5a22803259 Author: Phil Carmody Date: Wed Oct 5 02:57:26 2011 +0300 bot.pl: cosmetic - strip all trailing spaces These were all in the original source. Signed-off-by: Phil Carmody commit ef0fef6e56bbd7fb2267dce5dcf10c448ba3b4bb Author: Phil Carmody Date: Sun Oct 30 17:54:29 2011 +0200 bot.pl: fix perl interpreter Signed-off-by: Phil Carmody commit 3fa5c5014271eb1b6cedc44c435f81fcffe228d9 Author: Phil Carmody Date: Thu Sep 29 15:08:21 2011 +0300 bot.pl: change the version number string Don't want to pretend to be the original Signed-off-by: Phil Carmody commit 36d771963845a67ac16023e3eb2286d5bd5e51fb Author: Phil Carmody Date: Thu Sep 29 14:04:27 2011 +0300 IdleRPG: initial checkin v3.1.2, Released June 6th Untouched apart from renaming the bot bot.pl Signed-off-by: Phil Carmody