Pages: [1]   Go Down
  Print  
Author Topic: No Name Players in MW2  (Read 196 times) Bookmark and Share
Newbie
*
OS: --No B3 installed--
Type: --No B3 installed--
Gameservers: COD6
Posts: 1
Offline Offline
« on: January 11, 2012, 09:13:26 PM »

Hello all,

I help admin a server in our clan, and recently we have run into a hacker that joins with no name. He continues to change his guid and ip. Sometimes he shows up after using !list, as just a number with no name, and other times doesn't show up at all. When I kick by client number I get an error that b3 could not parse my command, yet the player still gets kicked, temb banning doesn't work. I tried editing a plugin that normally is used to kick players with unicode characters in there name. But it didnt work last time he joined. Does this look like it would work?

Code: python

__author__ = 'Dr_Z'
__version__ = '1.0.1'
__date__ = '2011-06-12'

import b3, re, time, sys
import b3.events
import b3.plugin

timekick = time.asctime(time.localtime(time.time()))

class AsciikickPlugin(b3.plugin.Plugin):
   def onStartup(self):        

       # Get the admin plugin so we can register commands
   # ** This is for future updates
       self._adminPlugin = self.console.getPlugin('admin')

       if not self._adminPlugin:
           # something is wrong, can't start without admin plugin
           self.error('Could not find admin plugin')
           return

       # Register events on client's connection
       self.verbose('Registering events')
       self.registerEvent(b3.events.EVT_CLIENT_CONNECT)

   def onLoadConfig(self):
       # Loading config file vars
       self.verbose('Loading config')
       try:
           self.kicknick = self.config.get('settings', 'kicknick')
       except:
           self.kicknick = 0
           self.debug('Default value (%i) for settings::kicknick', self.kicknick)

       try:
           self.announce = self.config.get('settings', 'announce')
       except:
           self.announce = 0
           self.debug('Default value (%i) for settings::announce', self.announce)

       try:
           self.logpath = self.config.get('settings', 'logpath')
       except:
           self.logpath = 0
           self.debug('Logging Disabled')

       return

   def onEvent(self, event):
       if (event.type == b3.events.EVT_CLIENT_CONNECT):
           isName = event.client.exactName
           isFound = '0'
       # RegExp Search for Non Printable Ascii and Unicode Characters in Client's Name
           isFound = re.search('[\x80-\xff]', isName)

       # If Client Name returns NULL :  Just Kick Them
           if (isName == ""):
               isName = 'NULL'
               admin_name = 'SYSTEM'
               reason2kick = '^2 NO NAME VALUE'
               #event.client.kick(reason=reason2kick, silent=True)
               self.console.kick(event.client.cid, reason2kick, None, True)

               # If Logging is Enabled, Make/Append Log File 'asciikick.log'
               if (self.logpath > 0):
                   # Log all Illegal Client Names sence B3 database can't handle Non printable ASCII and Unicode characters
                   #
                   filelog = ('%s%s' % tuple([self.logpath, 'asciikick.log']))
                   self.debug('opening asciikick.log file')
                   f = open(filelog, "a")
                   f.write('%s :: Admin: %s :: Player Kicked: %s :: Player IP: %s :: CLient guid: %s \n' % tuple([timekick, admin_name, isName, event.client.ip, event.client.guid]))
                   f.close()
                   #
                   # END Logging of Kicked Player
                   return
               return
       else:
               # No attributes to dump onEvent -- Just return to b3 #
               return
       else:
       return
       return
Logged

Jr. Member
**
OS: Windows
Type: Renting Server with B3
Posts: 10
Offline Offline
« Reply #1 on: January 17, 2012, 10:18:00 AM »

Where having the same problem,
We have over 80 or so No name players in our echelon database and it's a pain banning each of them one by one..

Problem is that most of the no name players are using hacks and it's a pain to kick them by id# for them to just come back in 3 minutes and destroy the fun others are trying to have.

A plugin that would just kick a player with No name would be great since B3 has no clue as what to do with them other than you said kicking them by client ID.

Logged
Tags:
Pages: [1]   Go Up
  Print  
 
Jump to:  


Rate this page +1 at Google Search


SimplePortal 2.3.1 © 2008-2009, SimplePortal