mirror of
https://git.wownero.com/wownero/tippero.git
synced 2024-08-15 00:33:14 +00:00
Only consider ! followed by a letter to be commands
Avoids error spam to users
This commit is contained in:
parent
72ddb11dff
commit
5224a0ef58
1 changed files with 3 additions and 1 deletions
|
@ -15,6 +15,7 @@ import hashlib
|
|||
import json
|
||||
import httplib
|
||||
import time
|
||||
import string
|
||||
|
||||
tipbot_name = "monero-testnet-tipbot"
|
||||
irc_network = 'irc.freenode.net'
|
||||
|
@ -843,7 +844,8 @@ while True:
|
|||
log_error('Failed to parse "who" line: %s: %s' % (data, str(e)))
|
||||
|
||||
elif action == 'PRIVMSG':
|
||||
if text.find('!') != -1:
|
||||
exidx = text.find('!')
|
||||
if exidx != -1 and len(text)>exidx+1 and text[exidx+1] in string.ascii_letters:
|
||||
cmd = text.split('!')[1]
|
||||
cmd = cmd.split(' ')
|
||||
cmd[0] = cmd[0].strip(' \t\n\r')
|
||||
|
|
Loading…
Reference in a new issue