@@ -0,0 +1,903 @@
+#!/usr/bin/python%0A%0Aimport sys%0Afrom redis import Redis%0A%0Adb = Redis()%0A%0Asession_id = sys.argv%5B2%5D%0A%0Aif sys.argv%5B1%5D=='add':%0A    db.sadd('global-mods', session_id)%0A    print 'Added to global mods list.'%0A    for chat in db.smembers('session.'+session_id+'.chats'):%0A        print 'Setting group in '+chat+' to globalmod.'%0A        db.hset('session.'+session_id+'.meta.'+chat, 'group', 'globalmod')%0A%0Aelif sys.argv%5B1%5D=='remove':%0A    print 'Removed from global mods list.'%0A    db.srem('global-mods', session_id)%0A    for chat in db.smembers('session.'+session_id+'.chats'):%0A        if db.hget('session.'+session_id+'.meta.'+chat, 'counter')=='1':%0A            print 'Setting group in '+chat+' to mod.'%0A            db.hset('session.'+session_id+'.meta.'+chat, 'group', 'mod')%0A        else:%0A            print 'Setting group in '+chat+' to user.'%0A            db.hset('session.'+session_id+'.meta.'+chat, 'group', 'user')%0A

Create script for adding/removing global mods.