mirror of
https://git.wownero.com/wownero/tippero.git
synced 2024-08-15 00:33:14 +00:00
Fix registered/admin checks not reporting errors to the user
This commit is contained in:
parent
65581f980f
commit
9be5047823
1 changed files with 5 additions and 2 deletions
|
@ -19,6 +19,9 @@ calltable=dict()
|
||||||
idles = []
|
idles = []
|
||||||
cleanup = dict()
|
cleanup = dict()
|
||||||
|
|
||||||
|
def SendToProxy(nick,chan,msg):
|
||||||
|
SendTo(nick,msg)
|
||||||
|
|
||||||
def RunRegisteredCommand(nick,chan,ifyes,yesdata,ifno,nodata):
|
def RunRegisteredCommand(nick,chan,ifyes,yesdata,ifno,nodata):
|
||||||
if nick not in calltable:
|
if nick not in calltable:
|
||||||
calltable[nick] = []
|
calltable[nick] = []
|
||||||
|
@ -147,9 +150,9 @@ def OnCommand(cmd,chan,who,check_admin,check_registered):
|
||||||
else:
|
else:
|
||||||
c = commands[cmdname][0]
|
c = commands[cmdname][0]
|
||||||
if 'admin' in c and c['admin']:
|
if 'admin' in c and c['admin']:
|
||||||
check_admin(GetNick(who),chan,c['function'],cmd,SendTo,"You must be admin")
|
check_admin(GetNick(who),chan,c['function'],cmd,SendToProxy,"You must be admin")
|
||||||
elif 'registered' in c and c['registered']:
|
elif 'registered' in c and c['registered']:
|
||||||
check_registered(GetNick(who),chan,c['function'],cmd,SendTo,"You must be registered with Freenode")
|
check_registered(GetNick(who),chan,c['function'],cmd,SendToProxy,"You must be registered with Freenode")
|
||||||
else:
|
else:
|
||||||
c['function'](GetNick(who),chan,cmd)
|
c['function'](GetNick(who),chan,cmd)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue