else:
                sclient.setGroup(group)
                sclient.save()

                cmd.sayLoudOrPM(
                    client,
                    self._adminPlugin.getMessage('groups_put',
                                                 sclient.exactName,
                                                 group.name))
                return True

if __name__ == '__main__':
    from b3.fake import fakeConsole
    from b3.fake import superadmin, joe

    fakeConsole.setCvar('g_mapcycle', 'mapcycle.txt')
    setattr(fakeConsole.game, 'fs_basepath', '/home/gabriel/urbanterror')
    setattr(fakeConsole.game, 'fs_game', 'q3ut4')

    p = ExtraadminPlugin(fakeConsole, '@b3/extplugins/conf/extraadmin.xml')
    p.onStartup()

    #print p._nextMap
    #print p._currentMap
    #p.find_next_map_rotation('ut4_tejen_beta3')
    #print p._nextMap
    superadmin.connects(cid=1)
    joe.connects(cid=2)
    time.sleep(2)
    superadmin.says("!cinfo 2")
                                           self._configs[num])):
                self.console.write('exec %s' % self._configs[num])
                self.debug('Executing %s' %
                           (os.path.join(self._confpath, self._configs[num])))
                self._last_run = num
            else:
                self.error('File %s do not exists' %
                           (os.path.join(self._confpath, self._configs[num])))
        else:
            self.debug('No config found for %d' % len(clients))


if __name__ == '__main__':
    from b3.fake import fakeConsole
    from b3.fake import joe, simon, moderator, superadmin
    import time

    fakeConsole.setCvar('g_mapcycle', 'mapcycle.txt')
    fakeConsole.setCvar('fs_homepath', '/local/codwar/q3a')
    setattr(fakeConsole, 'gameName', 'iou')

    p = BalancerPlugin(fakeConsole, '@b3/extplugins/conf/balancer.xml')
    p.onStartup()

    joe.connects(cid=1)
    simon.connects(cid=2)
    moderator.connects(cid=3)
    superadmin.connects(cid=4)

    print "-------------------------"
    def onLoadConfig(self):
        try:
            self._min_level = self.config.getint('settings', 'min_level')
        except:
            self._min_level = 80
        
    def cmd_loadconfig(self, data, client, cmd=None):
        if not data:
            client.message('^7Invalid or missing data.')
        filename = os.path.join(self._confpath,"%s.cfg" % data)
        if os.path.isfile(filename):
            self.debug('Executing %s' %(filename))            
            self.console.write('exec %s.cfg' % data)
            client.message("^7Loaded: ^2%s.cfg" % data)
        else:
            self.debug('Config file %s not found' % filename)
            client.message('^7Config file not found')

if __name__ == '__main__':
    from b3.fake import fakeConsole
    
    setattr(fakeConsole.game,'fs_homepath','.q3a')
    setattr(fakeConsole.game,'fs_game','q3ut4')
    setattr(fakeConsole,'gameName','iourt')
    fakeConsole.setCvar('fs_homepath','.q3a')
    fakeConsole.setCvar('fs_game','q3ut4')

    p = ConfigloaderPlugin(fakeConsole, '@b3/extplugins/conf/configloader.xml')
    p.onStartup()
Exemple #4
0
    
    print("oauth_token: " + access_token.key)
    print("oauth_token_secret: " + access_token.secret)
        
    # Do a test API call using our new credentials
    api = tweepy.API(twitter)
    user_timeline = api.user_timeline()

    pp = pprint.PrettyPrinter(indent=4)
    pp.pprint(user_timeline)

    print("oauth_token: " + access_token.key)
    print("oauth_token_secret: " + access_token.secret)
    
if __name__ == '__main__':
    import sys
    
    if len(sys.argv)>1 and sys.argv[1]=="setup":
        do_initial_setup()
    else:
        from b3.fake import fakeConsole
        from b3.fake import joe

        setattr(fakeConsole.game,'fs_basepath','/home/gabriel/io1')
        setattr(fakeConsole.game,'fs_game','q3ut4')
        fakeConsole.setCvar('sv_hostname','C3')

        p = TwityPlugin(fakeConsole, '@b3/extplugins/conf/twity.xml')
        p.onStartup()
        p.post_update("System test")
Exemple #5
0
            if self._last_run and self._last_run == num:
                return            
                
            if os.path.isfile(os.path.join(self._confpath,self._configs[num])):
                self.console.write('exec %s' % self._configs[num])
                self.debug('Executing %s' %(os.path.join(self._confpath,self._configs[num])))
                self._last_run = num
            else:
                self.error('File %s do not exists' %(os.path.join(self._confpath,self._configs[num])))
        else:
            self.debug('No config found for %d' % len(clients))

if __name__ == '__main__':
    from b3.fake import fakeConsole
    from b3.fake import joe, simon, moderator, superadmin
    import time
    
    fakeConsole.setCvar('g_mapcycle','mapcycle.txt')
    fakeConsole.setCvar('fs_homepath','/local/codwar/q3a')
    setattr(fakeConsole,'gameName','iou')
        
    p = BalancerPlugin(fakeConsole, '@b3/extplugins/conf/balancer.xml')
    p.onStartup()
    
    joe.connects(cid=1)
    simon.connects(cid=2)
    moderator.connects(cid=3)
    superadmin.connects(cid=4)
    
    print "-------------------------"
Exemple #6
0
            return
        if self._victim.connected:
            self._parent.bot("^1MUTE ^3%s" % self._victim.exactName)
            self.console.say("^1MUTE ^3%s" % self._victim.exactName)
            self.console.write('mute %s %s' % (self._victim.cid, ''))
            self._victim = None

    def end_vote_no(self,  yes,  no):
        self.console.say(self._parent.getMessage('failed_vote'))
        self._victim = None

if __name__ == '__main__':
    from b3.fake import fakeConsole
    from b3.fake import superadmin, reg, admin
 
    fakeConsole.setCvar('g_mapcycle','mapcycle.txt')
    setattr(fakeConsole.game,'fs_basepath','/home/gabriel/.q3a')
    setattr(fakeConsole.game,'fs_game','q3ut4')

    p = Voting2GPlugin(fakeConsole, '@b3/extplugins/conf/voting2g.xml')
    p.onStartup()
    
    superadmin.connects(cid=1)
    reg.connects(cid=2)
    admin.connects(cid=3)
    time.sleep(2)
    superadmin.says("!maplist")
    time.sleep(2)
    admin.says("!votemap ut4_turnpike")
    time.sleep(1)
    reg.says("!vy")