Esempio n. 1
0
            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")
Esempio n. 2
0
    
    p = TkPlugin(fakeConsole, "@b3/conf/plugin_tk.xml")
    p.onStartup() # register events, etc
    p._forgive_delay = 5
    p._autoforgive_level = 0

    joe.team = b3.TEAM_BLUE
    simon.team = b3.TEAM_BLUE
   
    joe.connects(cid=1)
    simon.connects(cid=2)
    moderator.connects(cid=3)
 
    time.sleep(5)
    joe.kills(simon)
    time.sleep(6)
    simon.kills(joe)
    time.sleep(2)
    time.sleep(2)
    joe.damages(simon)
    moderator.says('!forgiveinfo reg')
    time.sleep(2)
    joe.damages(simon)
    joe.damages(simon)
    moderator.says('!forgiveinfo reg')
    simon.kills(joe)
    time.sleep(2)
    joe.kills(simon)
    joe.says('!grudge simon')
    time.sleep(2)    
Esempio n. 3
0
    p = TkPlugin(fakeConsole, "@b3/conf/plugin_tk.xml")
    p.onStartup()  # register events, etc
    p._forgive_delay = 5
    p._autoforgive_level = 0

    joe.team = b3.TEAM_BLUE
    simon.team = b3.TEAM_BLUE

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

    time.sleep(5)
    joe.kills(simon)
    time.sleep(6)
    simon.kills(joe)
    time.sleep(2)
    time.sleep(2)
    joe.damages(simon)
    moderator.says('!forgiveinfo reg')
    time.sleep(2)
    joe.damages(simon)
    joe.damages(simon)
    moderator.says('!forgiveinfo reg')
    simon.kills(joe)
    time.sleep(2)
    joe.kills(simon)
    joe.says('!grudge simon')
    time.sleep(2)
Esempio n. 4
0
                    '^2%s ^3says: %s %s' % (client.name,
                    random.choice(self._p2p_cmddict[cmd.command]),
                    sclient.name))

        else:
            client.message(self._cmddict[cmd.command])
            
if __name__ == '__main__':

    from b3.fake import fakeConsole, joe, reg, superadmin
 
    myplugin = MorespamPlugin(fakeConsole, '@b3/extplugins/conf/morespam.xml')
    print("\n\n * * * * * * * * * * * *  Tests starting below * * * * * * * * * * * * \n\n")
 
    # we call onStartup() as the real B3 would do
    myplugin.onStartup()
 
    # make superadmin connect to the fake game server on slot 0
    superadmin.connects(cid=0)
 
    # make joe and reg connect to the fake game server on slot 1
    joe.connects(cid=1)
    reg.connects(cid=2)
 
    # superadmin put joe in group user
    superadmin.says('!putgroup reg admin')
 
    # make joe try our commands
    reg.says('!ns joe')
    reg.says('!lol joe')
Esempio n. 5
0
        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")