Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if cmd == "udf" and len(args) > 0:
- try:
- word = args
- if word in dictionary:
- definition, name = json.loads(dictionary[word])
- if name == user.name or self.getAccess(user) >= 3:
- del dictionary[word]
- f =open("definitions.txt", "w")
- for word in dictionary:
- definition, name = json.loads(dictionary[word])
- f.write(json.dumps([word, definition, name])+"\n")
- f.close
- room.message(args+" has been removed from Definition database")
- return
- else:
- room.message("<b>%s</b> you can not remove this define only masters or the person who defined the word may remove definitions" % user.name, True)
- return
- else:
- room.message("<b>%s</b> is not yet defined you can define it by typing <b>define %s: meaning</b>" % args, True)
- except:
- room.message("can't")
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement