mirror of
https://git.wownero.com/wownero/tippero.git
synced 2024-08-15 00:33:14 +00:00
Make sure cmd[1] exists before checking it
This commit is contained in:
parent
4a73c75722
commit
ed00dccd5a
1 changed files with 4 additions and 3 deletions
|
@ -160,9 +160,10 @@ class RedditNetwork(Network):
|
||||||
while '' in cmd:
|
while '' in cmd:
|
||||||
cmd.remove('')
|
cmd.remove('')
|
||||||
cmd[0] = cmd[0].strip(' \t\n\r')
|
cmd[0] = cmd[0].strip(' \t\n\r')
|
||||||
if cmd[0] == u'tip' and cmd[1][0:3] == u'/u/':
|
if cmd[1]:
|
||||||
log_info("Subbing out /u/ from username")
|
if cmd[0] == u'tip' and cmd[1][0:3] == u'/u/':
|
||||||
cmd[1] = cmd[1][3:]
|
log_info("Subbing out /u/ from username")
|
||||||
|
cmd[1] = cmd[1][3:]
|
||||||
log_info('Found command from %s: %s' % (link.identity(), str(cmd)))
|
log_info('Found command from %s: %s' % (link.identity(), str(cmd)))
|
||||||
if self.on_command:
|
if self.on_command:
|
||||||
self.on_command(link,cmd)
|
self.on_command(link,cmd)
|
||||||
|
|
Loading…
Reference in a new issue