mirror of
http://aero2k.de/t/repos/urlbot-native.git
synced 2017-09-06 15:25:38 +02:00
get_reply_data: split on anything, remove strip(\n)
This commit is contained in:
@@ -18,14 +18,14 @@ plugins['command'] = []
|
||||
def get_reply_data(data, field=0):
|
||||
# FIXME: we can't determine if a user named 'foo> ' just wrote ' > bar'
|
||||
# or a user 'foo' just wrote '> > bar'
|
||||
f = data.split(' ')
|
||||
f = data.split()
|
||||
|
||||
if 0 == field:
|
||||
return f[0].strip('<>')
|
||||
else:
|
||||
if field > len(f):
|
||||
return None
|
||||
return f[field].strip('\n')
|
||||
return f[field]
|
||||
|
||||
def register_event(t, callback, args):
|
||||
joblist.append((t, callback, args))
|
||||
|
||||
Reference in New Issue
Block a user