Hi,
I found a bug in CoD4, however it is easy to solve this issue via B3

The bug is as following: if you type: !map killhouse in the chat, the server will change the map to killhouse (
WITHOUT mp_ in the front).
This will cause an infinity loop on the Call of Duty 4 server, so it kinda crash. Strange enough it's only with the map Killhouse. I know of source the normal way to use it is: !map mp_killhouse, but sometimes people forgot it to use mp_.
Here is the fix...
I added maplist.txt in the conf folder. So it checks every input and compares it with the maplist. If the map is found it returns TRUE and the map will be changed.
plugin_admin.xml find:
<settings name="settings">
add below:
@b3/conf/maplist.txt
admin.py find:
_long_tempban_max_duration = 1440 # 60m/h x 24h = 1440m = 1d
Add below:
_mapList = []
Same file,
find:
self.verbose('SuperAdmin(s) found, no need for !iamgod')
Add below:
f = open(self.config.getpath('settings', 'mapfile'))
for line in f:
self._mapList.append(line.strip())Same file,
find:
def cmd_map(self, data, client, cmd=None):
Add before:
def check_map(self, data, client):
m = self.parseUserCmd(data)
if not m:
client.message('^7Invalid parameters')
return False
if not m[0]:
client.message('^7You must supply a map to change to.')
return False
s = m[0]
matched = False
for map in self._mapList:
if s == map:
if matched:
client.message('^7More than one map matches the name, be more specific')
return False
matched = True
if not matched:
client.message('^7No map matched that name')
return matched
Same file,
find:
Add below:
if not self.check_map(data, client):
return False
I hope you will apply this patch.
Beside this I found another bug, this time in B3 itself. It's about
the vote plugin, which is still in alfa/beta stage but oké.
Find:
if s is map:
replace to
if s == map:
.
Thanks!
Kind regards,
Melroy van den Berg
Attachment:
-maplist.txt
[attachment deleted by maintenance]