mirror of
https://xfnw.ttm.sh/git/oirc.git
synced 2024-06-12 20:06:37 +00:00
Compare commits
3 Commits
c855d9c8ea
...
2888fa2fbd
Author | SHA1 | Date | |
---|---|---|---|
2888fa2fbd | |||
b1299b7752 | |||
1e50154087 |
|
@ -2,6 +2,7 @@
|
||||||
import random
|
import random
|
||||||
|
|
||||||
async def owologger(self,c,n,m):
|
async def owologger(self,c,n,m):
|
||||||
|
print("<{} {}> {}".format(c,n,m))
|
||||||
if m[:len(self.prefix)] == self.prefix:
|
if m[:len(self.prefix)] == self.prefix:
|
||||||
return
|
return
|
||||||
if c not in self.owolog:
|
if c not in self.owolog:
|
||||||
|
|
|
@ -119,7 +119,7 @@ def formatSec(dt):
|
||||||
|
|
||||||
|
|
||||||
async def upnext(self,c,n,m):
|
async def upnext(self,c,n,m):
|
||||||
if 'tildebot' in self.channels[c]['users']:
|
if self.tildebot and c in self.channels and 'tildebot' in self.channels[c]['users']:
|
||||||
return # only respond in #tr whilst tildebot is down
|
return # only respond in #tr whilst tildebot is down
|
||||||
res = requests.get('https://radio.tildeverse.org/api/station/1/schedule')
|
res = requests.get('https://radio.tildeverse.org/api/station/1/schedule')
|
||||||
if res.status_code == 200:
|
if res.status_code == 200:
|
||||||
|
@ -133,7 +133,7 @@ async def upnext(self,c,n,m):
|
||||||
await self.message(c,'[\x036radio\x0f] something went wrong...')
|
await self.message(c,'[\x036radio\x0f] something went wrong...')
|
||||||
|
|
||||||
async def nowplaying(self,c,n,m):
|
async def nowplaying(self,c,n,m):
|
||||||
if 'tildebot' in self.channels[c]['users']:
|
if self.tildebot and c in self.channels and 'tildebot' in self.channels[c]['users']:
|
||||||
return # only respond in #tr whilst tildebot is down
|
return # only respond in #tr whilst tildebot is down
|
||||||
res = requests.get("https://radio.tildeverse.org/api/nowplaying/1")
|
res = requests.get("https://radio.tildeverse.org/api/nowplaying/1")
|
||||||
if res.status_code == 200:
|
if res.status_code == 200:
|
||||||
|
@ -200,6 +200,7 @@ async def remindTask(self, n, up, delta_time,c):
|
||||||
|
|
||||||
|
|
||||||
async def init(self):
|
async def init(self):
|
||||||
|
self.tildebot = True
|
||||||
self.rreminders = {}
|
self.rreminders = {}
|
||||||
self.cmd['un'] = upnext
|
self.cmd['un'] = upnext
|
||||||
self.cmd['upnext'] = upnext
|
self.cmd['upnext'] = upnext
|
||||||
|
|
Loading…
Reference in New Issue
Block a user