Browse Source

Voice users when joining if active; v0.1.1

nickolas360 3 years ago
parent
commit
c732f82b99
2 changed files with 8 additions and 4 deletions
  1. 3
    3
      README.md
  2. 5
    1
      voicebot.py

+ 3
- 3
README.md View File

@@ -1,7 +1,7 @@
1 1
 voicebot
2 2
 ========
3 3
 
4
-Version 0.1.0
4
+Version 0.1.1
5 5
 
6 6
 **voicebot** automatically voices and devoices users in an IRC channel based
7 7
 on activity. Users can see who's been active recently simply by looking at
@@ -40,9 +40,9 @@ executable):
40 40
 What's new
41 41
 ----------
42 42
 
43
-Version 0.1.0:
43
+Version 0.1.1:
44 44
 
45
-* Initial release.
45
+* Users are now voiced when joining if they have been active recently.
46 46
 
47 47
 Dependencies
48 48
 ------------

+ 5
- 1
voicebot.py View File

@@ -48,7 +48,7 @@ import os
48 48
 import sys
49 49
 import time
50 50
 
51
-__version__ = "0.1.0"
51
+__version__ = "0.1.1"
52 52
 
53 53
 # If modified, update this URL to point to the modified version.
54 54
 SOURCE_URL = "https://github.com/nickolas360/voicebot"
@@ -192,6 +192,10 @@ class Voicebot:
192 192
     async def on_nick(self, sender, nickname):
193 193
         await self.refresh_voice_status(nickname)
194 194
 
195
+    @Event.join
196
+    async def on_join(self, sender, channel):
197
+        await self.refresh_voice_status(sender, update_times=False)
198
+
195 199
     @Event.command("ACCOUNT")
196 200
     async def on_account(self, sender, account):
197 201
         await self.refresh_voice_status(sender, update_times=False)

Loading…
Cancel
Save