def testPlugin(p): joe.connects(1) joe.gear = None joe.team = b3.TEAM_SPEC joe.changesGear('GLAOWRA') joe.gear = None joe.team = b3.TEAM_BLUE joe.changesGear('GLAOWRA') print "\nJoe takes smoke grenades" joe.changesGear('GLAQWRA') time.sleep(1) print "\nJoe goes to red team" joe.team = b3.TEAM_RED time.sleep(1) print "\nJoe takes HE grenades and goes to RED" joe.changesGear('GLAOWRA') joe.team = b3.TEAM_RED superadmin.connects(0) superadmin.says('!wpctrl -he') time.sleep(2) joe.disconnects() superadmin.disconnects()
client.message("^7The Chat Spy is [^1OFF^7]") if data == "on": if client not in self._listeners: self._listeners.append(client) client.message("^7Spy: [^2ON^7]") else: client.message("You are already spying on chats!") if data == "off": if client in self._listeners: self._listeners.remove(client) client.message("^7Spy: [^1OFF^7]") else: client.message("You are not spying on chats!") if __name__ == "__main__": from b3.fake import fakeConsole, joe, moderator, superadmin plugin = ChatspyPlugin(fakeConsole) plugin.onStartup() superadmin.connects(cid = 0) superadmin.team = 1 joe.connects(cid = 1) joe.team = 2 moderator.connects(cid = 2) moderator.team = 3 superadmin.says("!spy on") joe.says2team("haha") superadmin.says("!spy on") superadmin.says("!help spy") joe.says2team("admin is a big fat noob") superadmin.disconnects()