Commit Graph

728 Commits

Author SHA1 Message Date
Janik Kleinhoff
7e6e190a1e Fix an undefined variable error (blame Vgr) 2015-02-18 05:05:26 +00:00
Vgr E.Barry
6f6805f1ea Tweak a few pingif messages to be more descriptive. 2015-02-17 06:08:38 -05:00
skizzerz
7d18a3b902 Alpha tweaks
- Fix bug when using bite and not specifying a victim where victim was
  None and thus trying to get their role resulted in a KeyError
- Forward params from bite onwards to kill so you no longer need to do
  both (although you can still bite one person and kill someone else if
  you REALLY wanted to for some reason... it still won't work though)
- If the bite failed for any reason (including if they targeted lycan
  who just instantly turns), refund the bite so the alpha wolf can try
  again after a wolf dies again during the day.
2015-02-16 23:39:27 -06:00
Vgr E.Barry
d107173268 Improve the pingif's versatility.
This merges !pingpref into !pingif, and allows for more user options, as
to how to get pinged. Default behaviour pings people once when their
desired player count is reached, and can be changed with !pingif as
well.
2015-02-16 20:59:11 -05:00
Vgr E.Barry
192b97d593 Improve the ping-if to not ping multiple times the same people. 2015-02-16 07:06:43 -05:00
Vgr E.Barry
225fdbc6bb Update the ping-if with @skizzerz's notes. 2015-02-15 21:03:30 -05:00
Vgr E.Barry
75b14a87c1 Improve the ping-if feature.
This adds sort of a rate-limiting and pinging method preferences. If the
amount of players the person wants is reached or exceeded, they will be
automatically added to the !ping list; this is the default behaviour.
Doing !pingpref will make the bot automatically ping them shortly after
- this is done by a separate thread which is started on the first join
and exits when game starts or last player quits. Doing so will not
remove them from the ping list.
2015-02-15 17:56:00 -05:00
Vgr E.Barry
d22d03d7d6 Add the new ping-if feature. 2015-02-15 14:47:46 +00:00
Janik Kleinhoff
40f9d9c04a !force: fix behaviour on fake nicks
!force 12 is meant to force 12, not to force 1 and 2.
Fixes issue introduced in 7f2e315.
2015-02-14 16:32:21 +00:00
Vgr E.Barry
c094028f87 Fix error arising when monster wins. 2015-02-14 11:03:46 -05:00
skizzerz
e5fd6326ba If GA guards harlot and harlot visits and harlot is attacked, play the harlot was attacked message 2015-02-07 20:19:18 -06:00
nyuszika7h
df64ebdd22 Fix !faftergame in PM with channel commands 2015-02-05 14:33:17 +01:00
nyuszika7h
b632f659e8 Fix code introduced in 1ce5d69 to be more clear
`L[:4:3]' isn't immediately obvious, especially for people coming from
other programming languages.
2015-02-05 14:16:32 +01:00
skizzerz
9652eb3cec Fix death triggers
Whenever a single target has multiple triggers (e.g. mad scientist +
assassin or assassin + lover), and the kills would overlap, errors would
happen. A previous attempt to fix this for the single case of scientist
+ lover/assassin was ill conceived and did not take deadlist into
account. Fix this properly now.
2015-02-01 18:57:03 -06:00
Vgr E.Barry
1ce5d69113 Improve is_admin and is_owner to check for cloak in privmsg if available. 2015-02-01 06:08:44 -05:00
skizzerz
b490d91f7a More ghost fixes with assistance from jacob1
- A ghost driven away by retribution totem can now get team wins if
  their team wins, but will not get individual wins. They used to
  unconditionally lose.
- Make it so ghosts driven away by retribution totem are no longer
  messaged and are no longer able to kill.
2015-01-31 22:38:32 -06:00
skizzerz
3f990a22ec Fix dead vengeful ghost always winning with village even if they are wolfteam, and clean up a weird-looking conditional 2015-01-31 21:58:33 -06:00
nyuszika7h
8df527e9d7 Fix grammar in message displayed on initial !join 2015-01-28 16:36:00 +01:00
skizzerz
ba9a9839fd noreveal balance tweaks: remove CS and make traitor turning message play when traitor turns 2015-01-26 22:24:16 -06:00
Janik Kleinhoff
d0db82faab simple clone role message: add missing period 2015-01-21 02:49:45 +00:00
nyuszika7h
677bb85053 Remove leftover debug print statements 2015-01-18 16:35:03 +01:00
nyuszika7h
07a684465e Merge pull request #109 from lykoss/fsync-command
fsync command
2015-01-18 10:16:04 +01:00
Janik Kleinhoff
f5da2aff99 mode sync: handle targetless mode changes as well 2015-01-18 05:39:00 +00:00
jacob1
653e881b39 put timestamp on RESTARTING message + 2 others
not on the 'loading module wolfgame' message since that will be removed soon and it helps divide logs anyway
2015-01-18 00:10:46 -05:00
jacob1
be6ab9d723 really fix OverflowError with huge stasis values (by setting a cap) 2015-01-17 23:51:56 -05:00
jacob1
befcc1d8ce fix observe error 2015-01-17 22:57:57 -05:00
Janik Kleinhoff
db65f07694 Call sync_modes() on incoming server mode change (i.e. netjoin) 2015-01-17 18:56:53 +00:00
nyuszika7h
c20512163e fstasis: Handle OverflowError gracefully 2015-01-17 19:00:46 +01:00
jacob1
39e835fe60 remove useless variable and if statement check 2015-01-16 01:09:56 -05:00
jacob1
7f2e3153e7 !force works on commands with raw_nick (vote) + some logic changes 2015-01-16 01:02:56 -05:00
Vgr E.Barry
a4806d6e89 Fix debug logging breaking assassin and love suicide. 2015-01-14 20:00:50 -05:00
Janik Kleinhoff
b9634c2b0c Add fsync command to sync modes manually 2015-01-14 21:05:57 +00:00
Janik Kleinhoff
be4e5ff510 mass_mode: allow setting modes without argument
This allows setting e.g. -m at the same time as devoicing old players.
2015-01-14 21:05:57 +00:00
Janik Kleinhoff
1f916a8f57 mass_mode: look at ISUPPORT MODES= token 2015-01-14 21:05:57 +00:00
nyuszika7h
adb039e83d Make !vote/!v work as an alias for !game in the join phase 2015-01-14 19:47:13 +01:00
nyuszika7h
431ebe86d3 wait: Add per-user rate limit 2015-01-14 13:50:14 +01:00
nyuszika7h
54fe9b347b wait: Use 'playing' in the decorator 2015-01-14 13:49:29 +01:00
Vgr E.Barry
87bb3fc599 Remove bold from logged messages and fix templates never logging. 2015-01-13 20:16:47 -05:00
Vgr E.Barry
d7c5f6f9ac Make logging messages consistent. 2015-01-13 20:01:57 -05:00
Vgr E.Barry
cdc04dc3e3 Add some more logging at some places. 2015-01-13 20:01:55 -05:00
Vgr E.Barry
ae8a4d350b Fix vengeful ghost logging message. 2015-01-13 20:01:54 -05:00
Vgr E.Barry
778c3bc232 Tweak a few debug messages. 2015-01-13 20:01:52 -05:00
Vgr E.Barry
7b1f710fb1 Improve debug logging messages. 2015-01-13 20:01:50 -05:00
Vgr E.Barry
cecf1c6fc5 Improve a few minor things.
Prevents "Unhandled command <stuff>" from writing to file, add back
weird piece of code to prevent too many templates and "would send
message to fake nick" message and creates file on startup if it doesn't
exist.
2015-01-13 19:59:02 -05:00
Vgr E.Barry
20eda8c5d1 Removed obsolete logging code. 2015-01-13 19:58:58 -05:00
Vgr E.Barry
55a14d6a3f Add a proper logging feature. Closes #72. 2015-01-13 19:58:55 -05:00
jacob1
ee00420812 fix missing space in oracle message 2015-01-12 14:21:27 -05:00
Vgr E.Barry
813dc38cbf Modify message for oracle. 2015-01-11 21:37:47 -05:00
Vgr E.Barry
8a35862cb8 Don't display message about not receiving a PM on first night. 2015-01-11 21:21:19 -05:00
Vgr E.Barry
c29ed805e1 Allows !v to view votes in PM. Closes #106. 2015-01-11 19:29:34 -05:00
Vgr E.Barry
982d6cb697 Fixed help not respecting !notice. Closes #107. 2015-01-11 19:23:45 -05:00
nyuszika7h
71a85bbd38 Fix rate limit affecting !fstart 2015-01-08 15:54:59 +01:00
nyuszika7h
59a6339729 Unify "not logged in to NickServ" notices
In some places, the bot says "not logged in to NickServ", while in other
places, it saays "not identified with NickServ". This changes all such
notices to use the first form.
2015-01-07 19:51:08 +01:00
nyuszika7h
667b824065 Fix typo: s/logged in/not logged in/ 2015-01-07 19:49:56 +01:00
jacob1
fa326b5fb3 fix fail with complete_match 2015-01-05 12:56:34 -05:00
jacob1
784bbe0111 prevent cases where you can unintentionally vote / act on yourself 2015-01-05 10:59:25 -05:00
skizzerz
5f458cc9dc Fix vengeful ghost incorrectly winning 2015-01-04 20:47:49 -06:00
Vgr E.Barry
e2c5c819d6 Make "frestart normalmode" behave as intended. 2015-01-03 20:04:13 -05:00
Vgr E.Barry
555f80eb5e Merge branch 'master' of https://github.com/lykoss/lykos 2015-01-03 18:21:49 -05:00
Vgr E.Barry
4a6bd6665f Fixes faftergame (again). 2015-01-03 18:21:27 -05:00
jacob1
6fc05abd71 Merge pull request #102 from skizzerz/drunkassassin
Remove some restrictions on who can be assassin
2015-01-03 18:20:58 -05:00
Vgr E.Barry
d780cf04ad Fixes faftergame. I should stop breaking things. 2015-01-03 18:03:13 -05:00
Vgr E.Barry
cd7aac9398 Fix random errors. Blame Vgr. 2015-01-03 17:49:29 -05:00
jacob1
47f4f77f10 check if game ends when bitten/amnesiac turn, instead of sending out PMs and continuing it 2015-01-03 15:41:16 -05:00
jacob1
22ad235620 mad scientist gets told their targets and is reminded of their role every night 2015-01-03 13:30:24 -05:00
skizzerz
9f28036494 Remove some restrictions on who can be assassin
The only roles that should NOT be assassin are roles that the other team
MUST kill in order to have a good shot at winning. Therefore, we don't
need to have so many saferoles unable to be assassin, as well as certain
neutral roles. The current list is as follows:

- wolves + traitor, since these all need to die for village to win
- lycan, because if turned they need to die for village to win
- seer/oracle/harlot/augur/detective, capable of making safes so wolves
  need to focus on killing them in order to have a shot at winning
- bodyguard/GA, capable of preventing other safes from dying, again need
  to die for wolves to have a shot at winning

Everyone else is fair game, including shaman, drunk, hunter, doctor,
crazed shaman, and fool (who were all previously restricted).

If drunk is assassin, they don't get to choose their target, rather they
get one randomly assigned to them automatically.
2015-01-03 12:16:26 -06:00
Vgr E.Barry
7d49ac4cc4 Fixed a few issues.
Added wildcard * for !force and !rforce, which match all players.
removed leftover error message and fixed !kill and !totem crashing the
bot.
2015-01-03 00:50:57 -05:00
Vgr E.Barry
94d5939f39 Fix calling inexistant variables. 2015-01-02 20:45:03 -05:00
Vgr E.Barry
41089786d8 Remove notice if using a role command you don't have access to. 2015-01-02 20:40:15 -05:00
Vgr E.Barry
0984f79bd9 Improve handling of kill and away/back/in/out.
Uses variables instead of hardcoded roles for kill. Doesn't warn about
incorrect use of away and back if var.OPT_IN_PING is on, and about
incorrect use of in/out if it's off. References #76.
2015-01-02 18:11:07 -05:00
Vgr E.Barry
32fd7b2fa2 Improve help command. 2015-01-02 18:08:19 -05:00
Vgr E.Barry
df26d8d25e Huge overhaul to the decorators + small changes.
- Merge channel and PM commands in a single decorator.
- Add many parameters for the decorators, reducing commands cluster.
- Added back the admin_only check for some commands; special-cased
'<console>'.
- Moved the checking for which roles are seen wolf in the settings; same
for seen as default.
- Added a variable to pick if one is seen as the default role or as a
villager where applicable (default: True).
- Fixed seer/oracle seeing through amnesiac.
- Some fixes to the totem chances that I forgot to add in the previous
commit.
- Removed some useless module imports.
- Moved some functions to settings.
- Changed all single-quotes to double-quotes in commands for
consistency.
- Renamed 'cmd' variable in both force and rforce commands to avoid
confusion.
- Probably a bunch of other things. Don't consider this commit
description to be 100% complete.
2015-01-02 15:57:44 -05:00
nyuszika7h
53cf4970ca Disable !game if !fgame was used 2015-01-01 23:45:46 +01:00
Janik Kleinhoff
698d6f86ae START_QUIT_DELAY: fix duration check 2015-01-01 19:19:56 +00:00
Janik Kleinhoff
b1e59c4f77 !quit: tell player how long until they can quit 2015-01-01 18:59:27 +00:00
Janik Kleinhoff
09b5a62a9b Disallow !quit immediately after starting to avoid accidents 2015-01-01 05:20:52 +00:00
nyuszika7h
7d509e7c1d start: Add per-user rate limit 2014-12-31 21:07:25 +01:00
nyuszika7h
8b6393bf8e fsay, fact: Fix usage message 2014-12-30 22:16:42 +01:00
nyuszika7h
740d8a6e33 Fix signal handling on Windows 2014-12-30 22:13:40 +01:00
Vgr E.Barry
4f4a3f82a2 Fix totem chances.
This fixes the totem chances needing to add up to 1, and now can add up
to any arbitrary number or fraction. This also adds a TOTEM_ORDER
variable for shamans, as an attempt to allow more shamans in the future.
2014-12-30 15:04:43 -05:00
jacob1
453242a257 improve some comments and fix 'f rom' typo 2014-12-28 17:26:30 -05:00
jacob1
8dce5a4d16 gramatical fixes (var.plural one by skizzerz) 2014-12-28 17:06:15 -05:00
jacob1
356b9a25ba fix alpha wolf being seen as villager 2014-12-28 17:03:52 -05:00
skizzerz
1e09bff8df Fix alpha wolf bug 2014-12-26 22:32:44 -06:00
Ryan Schmidt
4e3b61f8dc Merge pull request #98 from skizzerz/alphawolf
Add 2 new roles: doctor and alpha wolf
2014-12-26 19:30:40 -06:00
skizzerz
93f5c6a4f8 Make the bite command make use of the new get_victim function 2014-12-26 01:06:23 -06:00
skizzerz
d42fa45d2f Make alpha wolf more powerful
Each time a wolf dies while a bitten person is undergoing
transformation, they will now transform one night earlier. This makes it
much more likely for the bitten person to actually turn into a wolf
before the game is over. For larger game sizes, the turn is pretty much
guaranteed due to the number of wolves, which means safes need to
tightly coordinate to figure out who was actually bitten due to wolves
possibly having full info and an insider.
2014-12-26 01:06:23 -06:00
skizzerz
9b61dde15e Add 2 new roles: doctor and alpha wolf
Doctor is on the village team, and has a number of immunizations they
can give out during the day. An immunized lycan reverts a normal
villager, and anyone that is immunized will die instead of turning into
a wolf if they are bitten by the alpha wolf. Beware, however, because
attempting to immunize someone already bitten will simply speed up the
process of them becoming a wolf!

Alpha wolf has a once-per-game ability where they can bite the wolves'
target instead of killing them following the death of a werewolf during
the day. The bitten person will subsequently turn into a wolf in 3
nights.
2014-12-26 01:06:17 -06:00
nyuszika7h
db9c52a3e2 Fix admin check in fdie and frestart 2014-12-23 23:56:55 +01:00
jacob1
ff737609b5 Fix error when silenced gunner shoots 2014-12-23 17:45:07 -05:00
nyuszika7h
274aedf050 Add SIGUSR2 for aftergame restart 2014-12-23 12:05:50 +01:00
nyuszika7h
036ac29f4b Add signal handling
- SIGINT (Ctrl-C) and SIGTERM will do a clean quit now.
- SIGUSR1 will restart the bot.
2014-12-22 23:38:06 +01:00
jacob1
15fab6c0b7 possibly prevent error if bot is opped before WHO results come back 2014-12-19 12:24:21 -05:00
jacob1
a6a87c2dde add villager and cultist to the amnesiac blacklist 2014-12-19 10:29:07 -05:00
jacob1
6a09f77a85 fix for recent gstats commit 2014-12-18 22:42:05 -05:00
jacob1
4573242f78 !roles uses var.role_order also (useful with !roles #) 2014-12-18 22:37:10 -05:00
jacob1
93cd95cfef fix !goat (also wasn't fully fixed) 2014-12-18 20:37:10 -05:00
jacob1
3a7c7f777b fix !faftergame frestart
was calling the pmcmd version with the arguments inside chan instead of *rest
2014-12-18 18:18:57 -05:00
jacob1
61e41a5776 fix gstats error when using 8p instead of just 8 2014-12-18 18:18:57 -05:00
jacob1
1a4ad90dd2 don't show "was x" for templates (thought I did this already) 2014-12-18 18:18:57 -05:00