rn = room+"/"+nick
comms = [('chat', 'test', test, 1, rn),
('chat', 'conv', conv, 0)]
for parse in comms:
if type == parse[0] and text[:len(parse[1])] == parse[1]:
print parse, text[len(parse[1])+1:]
if parse[3]:
if len(parse)>5:
pparse=parse[4:]
else:
pparse=parse[4]
exec parse[2](pparse)
else:
exec parse[2](text[len(parse[1])+1:])