Kick message + GM13 changes

Added a new function to the hook library to match Garry's API.
Better deal with blank reasons when kicking users, fixes #13 (Thanks Cpt. David)
This commit is contained in:
Nayruden 2012-10-07 19:02:50 -04:00
parent 95918f15cb
commit 6d22a09757
3 changed files with 21 additions and 1 deletions

View File

@ -45,7 +45,9 @@ Rest easy!
Group: Changelog
v2.50 - *(00/00/00)*
* [FIX] The usual assortment of garry breakages.
* [FIX] Changed away from our custom implementation of datastream to use Garry's new net library.
* [CHANGE] Lots of changes to match GM13.
v2.43 - *(00/00/00)*
* [CHANGE] NumArg now allows for time string format.

View File

@ -91,7 +91,7 @@ end
reason - *(Optional)* The reason to give for kicking.
]]
function ULib.kick( ply, reason )
ply:Kick( reason or "" )
ply:Kick( reason or "[ULX] Kicked from server" )
end

View File

@ -113,6 +113,24 @@ function Remove( event_name, name )
BackwardsHooks[ event_name ][ name ] = nil
end
--[[
Function: hook.Run
A convienence function created by Garry so you don't have to pass the gamemode in by hand.
Parameters:
name - The name of the event
... - Any other params to pass
Revisions:
2.50 - Created to match GM13 API
]]
function Run( name, ... )
return Call( name, GAMEMODE, ... )
end
--[[
Function: hook.Call