Commit Graph

2341 Commits

Author SHA1 Message Date
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
Vgr E. Barry
898a7107ca Allow passing contexts to Channel.mode 2016-12-19 13:09:23 -05:00
Vgr E. Barry
9014d5c35c Make comparing contexts easier 2016-12-19 13:09:12 -05:00
Vgr E. Barry
59e7c13a0b Move equals from users to context 2016-12-19 13:08:18 -05:00
Vgr E. Barry
63d908a61a Properly handle channel casing 2016-12-19 13:08:07 -05:00
nyuszika7h
a3fd532b3a Fix UnboundLocalError for regain/release 2016-12-16 11:38:07 +01:00
Vgr E. Barry
33563da1eb Fix users.get(..., allow_multiple=True) to always return a list 2016-12-14 20:04:36 -05:00
skizzerz
6bf12520f1 Fix day timeout causing game to end twice 2016-12-14 10:23:00 -06:00
nyuszika7h
144b01cfed !restart already fixed, small change for consistency 2016-12-11 10:27:39 +01:00
nyuszika7h
218366cbd8 !die: Fix first word of message being cut off in debug mode 2016-12-11 10:25:14 +01:00
Vgr E. Barry
06486e14bd Fix fsay/fact broken for non-existent users 2016-12-11 01:33:14 -05:00
Vgr E. Barry
dff024e5e4 Allow contexts to be used directly in str.format() calls 2016-12-09 10:56:34 -05:00
Vgr E. Barry
e1be940f24 Fix !join erroring out 2016-12-09 10:54:16 -05:00
jacob1
2c5e108751 fix error on !join when ACCOUNTS_ONLY is set 2016-12-09 07:56:40 -05:00
Ryan Schmidt
9f4b1a243d Merge pull request #274 from lykoss/cmd-old-api
Add a backwards-compatibility handler for commands
2016-12-08 16:35:19 -07:00
skizzerz
47339618f8 Remove part/fpart command
There is no reason for this to be a command. It has no analogue outside
of fsend, in which case you can just fsend a raw PART if needed as well.
2016-12-08 17:23:15 -06:00