p = StatsPlugin(fakeConsole, conf) p.onStartup() p.onLoadConfig() time.sleep(1) joe.connects(cid=3) joe.says("!mapstats") joe.says("!mystatalias") joe.says("!testscore") joe.says("!tscr") joe.says("!topstats") joe.says("!tops") joe.says("!topxp") joe.says("!txp") superadmin.connects(cid=2) joe.kills(superadmin) joe.kills(superadmin) joe.kills(superadmin) superadmin.kills(joe) superadmin.says("!mapstats") superadmin.says("!mystatalias") superadmin.says("!testscore") superadmin.says("!tscr") superadmin.says("!topstats") superadmin.says("!tops") superadmin.says("!topxp") superadmin.says("!txp")
p.onLoadConfig() time.sleep(1) joe.connects(cid=3) joe.says("!mapstats") joe.says("!mystatalias") joe.says("!testscore") joe.says("!tscr") joe.says("!topstats") joe.says("!tops") joe.says("!topxp") joe.says("!txp") superadmin.connects(cid=2) joe.kills(superadmin) joe.kills(superadmin) joe.kills(superadmin) superadmin.kills(joe) superadmin.says("!mapstats") superadmin.says("!mystatalias") superadmin.says("!testscore") superadmin.says("!tscr") superadmin.says("!topstats") superadmin.says("!tops") superadmin.says("!topxp") superadmin.says("!txp")
joe.connects(cid=1) superadmin.connects(cid=2) print "----------- Testing Privilege ------------" joe.says('!weaponrestrict off') time.sleep(5) print "----------- Testing No data ------------" superadmin.says('!weaponrestrict') time.sleep(5) print "----------- Testing wrong data ------------" superadmin.says('!weaponrestrict ofk') time.sleep(5) print "----------- Testing Restriction Off ------------" superadmin.says('!weaponrestrict off') time.sleep(5) print "----------- Testing Kill when Restriction Off ------------" superadmin.kills(joe, 'M320') time.sleep(5) print "----------- Testing Restriction On ------------" superadmin.says('!weaponrestrict On') time.sleep(5) print "----------- Testing Kill when Restriction On ------------" superadmin.kills(joe, 'M320') time.sleep(5)