Example #1
0
 def startTimer(self, schid=0, cid=0):
     if schid != 0: self.schid = schid
     if cid != 0: self.cid = cid
     self.timer.start(self.interval)
     self.tick()
     ts3lib.requestInfoUpdate(self.schid, PluginItemType.PLUGIN_CHANNEL,
                              self.cid)
Example #2
0
 def onServerErrorEvent(self, schid, errorMessage, error, returnCode, extraMessage):
     if returnCode == "passwordCracker:manual":
         (err, name) = ts3lib.getChannelVariable(schid, self.cid, ChannelProperties.CHANNEL_NAME)
         errorMessage = errorMessage.title()
         msgBox("Channel: {0}\n\nPW: {1}\n\nResult: {2}".format(name, self.pw,errorMessage))
     if not returnCode == self.retcode: return
     errorMessage = errorMessage.title()
     if error == ERROR_channel_invalid_password:
         if self.flooding: self.flooding = False
         self.status = '[color=orange]{0}[/color]'.format(errorMessage)
         ts3lib.requestInfoUpdate(schid, PluginItemType.PLUGIN_CHANNEL, self.cid)
     elif error == ERROR_client_is_flooding:
         self.flooding = True
         self.timer.stop()
         QTimer.singleShot(self.antiflood_delay, self.startTimer)
         self.status = '[color=red]{0}[/color]'.format(errorMessage)
         ts3lib.requestInfoUpdate(schid, PluginItemType.PLUGIN_CHANNEL, self.cid)
     elif error == ERROR_channel_invalid_id:
         self.timer.stop()
         self.status = '[color=red]{0}[/color]'.format(errorMessage)
         ts3lib.requestInfoUpdate(schid, PluginItemType.PLUGIN_CHANNEL, self.cid)
         msgBox("Channel #{0} is invalid!\n\nStopping Cracker!".format(self.cid), QMessageBox.Warning)
     elif error == ERROR_ok:
         if self.flooding: self.flooding = False
         self.timer.stop()
         (err, name) = ts3lib.getChannelVariable(schid, self.cid, ChannelProperties.CHANNEL_NAME)
         ts3lib.printMessageToCurrentTab('Channel: {0} Password: \"{1}\"'.format(channelURL(schid, self.cid, name), self.pws[self.pwc-1] if self.mode == 0 else self.pwc-1))
         self.status = '[color=green]{0}[/color]'.format(errorMessage)
         ts3lib.requestInfoUpdate(schid, PluginItemType.PLUGIN_CHANNEL, self.cid)
         if confirm("Password found! ({0} / {1})".format(self.pwc, len(self.pws)) if self.mode == 0 else "Password found!",
                    "Password \"{0}\" was found for channel \"{1}\"\n\nDo you want to join now?".format(self.pws[self.pwc-1] if self.mode == 0 else self.pwc-1,name)):
             (err, ownID) = ts3lib.getClientID(schid)
             ts3lib.requestClientMove(schid, ownID, self.cid, self.pws[self.pwc-1] if self.mode == 0 else str(self.pwc-1))
     else:
         self.status = errorMessage
         ts3lib.requestInfoUpdate(schid, PluginItemType.PLUGIN_CHANNEL, self.cid)
     if error in [ERROR_channel_invalid_id, ERROR_ok] or returnCode in ["passwordCracker:manual"]: self.schid = 0;self.cid = 0;self.pwc = 0
     return 1
Example #3
0
 def onUpdateClientEvent(self, schid, clid, invokerID, invokerName,
                         invokerUniqueIdentifier):
     if clid in self.requestedCLIDS: return
     self.requestedCLIDS.append(clid)
     ts3.requestInfoUpdate(schid, PluginItemType.PLUGIN_CLIENT, schid)
Example #4
0
 def onConnectionInfoEvent(self, schid, clid):
     if clid in self.requestedCLIDS: return
     self.requestedCLIDS.append(clid)
     ts3.requestInfoUpdate(schid, PluginItemType.PLUGIN_CLIENT, schid)
Example #5
0
 def onServerUpdatedEvent(self, schid):
     if schid in self.requested: return
     self.requested.append(schid)
     ts3.requestInfoUpdate(schid, PluginItemType.PLUGIN_SERVER, schid)