rpn \ operator

This commit is contained in:
vulpine 2020-10-21 21:19:05 -04:00
parent 01f606ff89
commit 5b30d6bdd5
2 changed files with 2 additions and 16 deletions

View File

@ -1,16 +0,0 @@
async def pd(self,c,n,m):
if n in ['tildebot','BitBot','xfnw'] and m == '・゜゜・。。・゜゜\\_o< QUACK!':
self.duckmsg[c] = 0
print('duck in',c)
elif c in self.duckmsg:
self.duckmsg[c] += 1
if self.duckmsg[c] == 200 or self.duckmsg[c] == 150 or self.duckmsg[c] == 140:
await self.notice(self.ducknotif,'i predict there will be a duck in {} soon'.format(c))
async def init(self):
self.rawm['pd'] = pd
self.ducknotif='xfnw'
self.duckmsg = {}

View File

@ -24,6 +24,8 @@ async def rpninp(self, chan, nick, msg):
self.rpnhist[chan][0] = self.rpnhist[chan][0]+self.rpnhist[chan].pop(1)
elif m == '-' or m == 's':
self.rpnhist[chan][0] = self.rpnhist[chan].pop(1)-self.rpnhist[chan][0]
elif m == '\\':
self.rpnhist[chan].insert(0,self.rpnhist[chan][0])
elif m == '*' or m == 'x' or m == 'm':
self.rpnhist[chan][0] = self.rpnhist[chan].pop(1)*self.rpnhist[chan][0]