Vgr E. Barry
058acd40d7
Fix wolfchat relaying and player renaming
2017-01-21 14:26:21 -05:00
nyuszika7h
1c5761ce26
Make the ping thread daemonized to allow the bot to quit
2017-01-19 21:22:59 +01:00
Vgr E. Barry
2354269ed2
Revert unintentional change to dullahan
2017-01-17 14:46:50 -05:00
Vgr E. Barry
bc63f2be4f
Mad scientist fixes
...
Also stats fix
2017-01-17 14:43:28 -05:00
Vgr E. Barry
8c2124fb6a
Add the new functions submodule, superseding utilities.py
...
All of the new functions handle and return User instances. Not used yet, but will be needed when converting roles.
2017-01-17 13:46:40 -05:00
Vgr E. Barry
accba42ea2
Change var.ALL_PLAYERS to hold User instances
...
Also some unrelated things
2017-01-17 13:45:38 -05:00
Vgr E. Barry
26fec0f5a0
Make sure fake users always get "sent" the simple messages
2017-01-17 13:44:52 -05:00
Vgr E. Barry
ad7e0f11ac
Ignore messages received before the bot is fully set up
2017-01-17 12:52:27 -05:00
skizzerz
740d14ef72
Experimental stats: intelligently determine if traitor could have died
...
If it is impossible for other (non-wolf) roles to have killed at night,
we do not deduct from the traitor count. This logic isn't perfect yet,
but should cover the majority of cases.
2017-01-16 16:38:51 -06:00
nyuszika7h
bde640c9ae
Don't attempt to identify with no password set
...
Some servers disconnect the client if PASS fails, so the bot will fail
to connect unless SERVER_PASS is also explicitly set to None.
2017-01-16 12:40:14 +01:00
Vgr E. Barry
cef59bce73
Fix small variable error
2017-01-15 10:03:11 -05:00
Vgr E. Barry
693ebf3546
Fix some oversights
2017-01-13 16:28:09 -05:00
Vgr E. Barry
d2211de510
Update deadchat handling
2017-01-13 16:17:40 -05:00
Vgr E. Barry
fea04471ca
Properly lowercase host everywhere
2017-01-13 16:17:03 -05:00
Vgr E. Barry
a0550f922b
Allow passing a list or tuple to IRCContext.queue_message
2017-01-13 16:15:20 -05:00
Vgr E. Barry
fb7bf56579
Fix proper lowercasing, take 2
2017-01-13 12:13:32 -05:00
Vgr E. Barry
2cd410ace8
Fix lowercasing a hostname to not use IRC lowercasing
2017-01-13 12:05:16 -05:00
Vgr E. Barry
4f36b189ff
Update pingif timer handler
2017-01-13 12:00:09 -05:00
Vgr E. Barry
96c36a13b6
Fix lowercasing a BotUser instance
2017-01-13 11:59:47 -05:00
Vgr E. Barry
52f6b9238a
Fix fspectate
2017-01-13 11:59:24 -05:00
Vgr E. Barry
a620860cc5
Update who_end event parameter
2017-01-13 11:57:16 -05:00
Vgr E. Barry
0ca9e8cbdb
Update the pingif command
2017-01-12 15:29:55 -05:00
Vgr E. Barry
582523bda5
Update refreshdb and ping commands
2017-01-12 15:29:34 -05:00
Vgr E. Barry
abf663706d
Update fsync and related functions
2017-01-12 15:28:58 -05:00
Vgr E. Barry
889408a7bb
Remove redundant lines
2017-01-12 14:13:05 -05:00
Vgr E. Barry
b3552574d5
Update database on simple and notice toggle
2017-01-12 14:02:17 -05:00
Vgr E. Barry
ce8babec56
Update the notice toggle command
2017-01-12 13:57:24 -05:00
Vgr E. Barry
eb5a54474e
Update the simple toggle command
2017-01-12 13:57:14 -05:00
Vgr E. Barry
f941f23e91
Update some docstrings in users.py
2017-01-12 13:55:07 -05:00
Vgr E. Barry
fe692dd74e
Update fdie and frestart to use the new command API
2017-01-12 12:46:05 -05:00
Vgr E. Barry
1b695b4849
Use the new IRCContext.send API instead of break_long_message
2017-01-12 12:45:16 -05:00
Vgr E. Barry
4a02943a6e
Use context directly for mode change
2017-01-12 12:44:34 -05:00
Vgr E. Barry
81c96f4a56
Tweak hooks.quit
2017-01-12 12:43:41 -05:00
Vgr E. Barry
87df9e1440
Add a client attribute to MessageDispatcher
2017-01-12 12:43:18 -05:00
Vgr E. Barry
16022599e5
Use __class__ cell for channel comparisons
2017-01-12 12:42:46 -05:00
Vgr E. Barry
420d67250f
Fix setting channel mode to None
2017-01-11 23:08:45 -05:00
Vgr E. Barry
fb6aa40170
Please stand away from water sources when short-circuiting
2017-01-11 22:54:19 -05:00
Vgr E. Barry
4bedfb0848
Fix unbound variable in sighandler
2017-01-07 11:28:05 -05:00
Ryan Schmidt
b1271ecbe0
Merge pull request #277 from lykoss/part-quit-hooks
...
Improve user part/quit/nick hooks
2017-01-06 10:17:28 -07:00
nyuszika7h
a6e4d2b3c1
Fix ping handling
...
Don't start a new timer every time someone calls !latency, and make it
work even if automatic pinging is disabled. Also, moved the command to
handler.py per @Vgr255's suggestion.
2017-01-06 17:07:42 +01:00
nyuszika7h
6f7e4398dd
Simplify latency checking code
...
Since we send the timestamp of the request with the ping and the server
will send it back, there is no need to store it.
2017-01-06 16:20:40 +01:00
nyuszika7h
06c60dfdc3
Fix circular import
...
The strange thing is that it was working on my test instance.
Probably because Python 3.6 changed something regarding that.
2017-01-06 15:58:53 +01:00
nyuszika7h
a6e3c0a720
Periodically ping server to detect disconnection
...
In some cases, disconnection from the server can be unclean and won't be
noticed until the bot tries to send a message, which may never happen if
it did not disconnect during the game. To solve this problem, it will
now ping the server every 2 minutes by default, which will result in
a broken pipe error if the connection is dead. This won't be able to
detect netsplits where the server the bot is on stays online, because
those are impossible to correctly detect in every case.
This commit also adds a !latency command so that users can verify if the
bot is lagging.
2017-01-06 15:52:26 +01:00
Vgr E. Barry
d78f0e5179
Fix realname being a space breaking handling
2017-01-01 11:01:33 -05:00
Vgr E. Barry
e0f8f172d6
Update part/quit/kick/nick hooks
2016-12-19 13:29:20 -05:00
Vgr E. Barry
53cd5dc616
Add a users.complete_match function, taking and returning Users
2016-12-19 13:29:02 -05:00
Vgr E. Barry
081f909260
Use proper __class__ cell for super
2016-12-19 13:10:06 -05:00
Vgr E. Barry
e7eabba791
More easily create fake users
2016-12-19 13:09:57 -05:00
Vgr E. Barry
85f8f9717a
Change variable name to be more informative
2016-12-19 13:09:47 -05:00
Vgr E. Barry
b6738f2216
Better handle channel key
2016-12-19 13:09:34 -05:00