Skip to content

Instantly share code, notes, and snippets.

View thomasleveil's full-sized avatar

Thomas LÉVEIL thomasleveil

View GitHub Profile
@thomasleveil
thomasleveil / ban.py
Created July 21, 2011 19:23
B3 BanPlugin
__author__ = 'NinjaNife'
__version__ = '1.0'
import string, re
import b3.events
import b3.plugin
#--------------------------------------------------------------------------------------------------
class BanPlugin(b3.plugin.Plugin):
# encoding: utf-8
#
# Plugin for BigBrotherBot(B3) (www.bigbrotherbot.net)
# Copyright (C) 2011 courgette@bigbrotherbot.net
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
#
# BigBrotherBot(B3) (www.bigbrotherbot.net)
# Copyright (C) 2005 Michael "ThorN" Thornton
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
@thomasleveil
thomasleveil / RO2_fixme.patch
Created October 30, 2011 03:01
suggestions for ro2 parser.
Index: b3/parsers/ro2/__init__.py
===================================================================
--- b3/parsers/ro2/__init__.py (date 1319941731000)
+++ b3/parsers/ro2/__init__.py (revision )
@@ -42,11 +42,7 @@
#
#
from b3 import functions
-from b3.clients import Client
-from b3.lib.sourcelib import SourceQuery
@thomasleveil
thomasleveil / mapList_runNextRound.log
Created October 30, 2011 17:29
BF3 881071 mapList.runNextRound loading next map when there are more rounds to play on current map
> version
['OK', 'BF3', '881071']
> mapList.clear
['OK']
> mapList.list
['OK', '0', '3']
> mapList.add MP_001 SquadRush0 10
['OK']
> mapList.add MP_003 SquadRush0 10
['OK']
@thomasleveil
thomasleveil / pmstats.py
Created October 31, 2011 10:31
B3 pm stats plugin
__version__ = '1.0.1'
__author__ = 'KnightOrk'
from b3 import clients
import b3, os, string, re, threading
import b3.events
import b3.plugin
class PmstatsPlugin(b3.plugin.Plugin):
@thomasleveil
thomasleveil / iourt41callvote.py
Created February 20, 2012 20:51
B3 parser for modded iourt 4.1 game server for adding call vote and vote events
#
# ioUrT callvote Parser for BigBrotherBot(B3) (www.bigbrotherbot.net)
# Copyright (C) 2012 courgette@bigbrotherbot.net
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@thomasleveil
thomasleveil / admin.py
Created August 2, 2012 20:35
B3 admin plugin with more verbosity to figure out http://bit.ly/PEavjM
#
# BigBrotherBot(B3) (www.bigbrotherbot.net)
# Copyright (C) 2005 Michael "ThorN" Thornton
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@thomasleveil
thomasleveil / gist:3258732
Created August 4, 2012 16:42
[Urt42 server bug] #cucurb1 - log lines limited to 1024 char

In the server log file, some log lines can have content over 1024 char but they get truncated after the 1024th char, then a space is added, and then the next log line is concatenated to that first line.

We end up with a long line (over 1024) which is the result of :

  • a line content of more than 1024 char truncated to 1024 char
  • a space
  • another 2nd log line content