WDMisc plugin

=-=-=-=-=-=-=



This is a simple plugin that I use as a testbed for various features and

other things I need to try from a plugin.



It currently provides two features:





  - a cvar "bounce" that, if set to 1, will exit the server at map change.

    I use this when I need to shutdown or the server, and don't want to

    kill it in the middle of a map, nor watch the server constantly until

    the timelimit expires.



  - it prints a centersay to all the players whenever someone in

    Counter-Strike plants the bomb. This was done basically as a

    proof-of-concept for catching certain game-events that aren't

    otherwise triggered by the HL API. It works only by examining every

    log message that the server generates, and checking to see if it

    includes the string indicating the particular event in question (in

    this case "Planted_The_Bomb").



    Although this works, it is really a rather POOR solution to the

    problem, as it assumes a LOT of string-compares, which can seriously

    degrade the performance of the server. I did try to take as many

    short-cuts as reasonable in the code, to decrease the amount of

    string-comparing going on, which makes the code a bit less readable

    than doing just a "strstr" on the log line.



Other features to be added/removed in the future...



--------------------------------------------------------------------------

