Commit Graph

430 Commits

Author SHA1 Message Date
Michael Flaherty
c09b32010f Add Profiler methodmap (#814)
* Add profiler methodmap

* No tag mismatches here

thanks pm

* Lets fix some documentation while we're here.

* Use proper methodmap documentation style

Across sm we use `//` for methodmap docs, so lets just keep this consistent
2018-07-08 11:05:29 -04:00
Michael Flaherty
9ceb1af4fe Add LogStackTrace native (#685) 2018-06-19 23:18:37 -07:00
Michael Flaherty
b9b6832a11 Streamline ConfDb loading proceedure (#791)
* Create DatabaseConfBuilder & remove locking
* Remove all refcounting

This is part 1/n in regards to this PR's rework
* Move db conf lookup out of RunThreadPart
* Return default configuration for failed lookups
* RefPtr members & stop leaks
* fix uint comparison warning
2018-06-19 09:35:37 -07:00
David Anderson
25b3d8f354 Update AMTL. 2018-05-31 21:23:59 -07:00
Ruben Gonzalez
e2767a3c80
Remove goto from ExtensionSys.cpp (#729) 2018-05-25 09:49:10 -04:00
jason-e
2904c87b62 Send ShowActivity messages to TV clients (#813)
`ShowActivity` and related functions are used to inform all clients about the usage of admin commands (such as bans or mutes). These messages are not sent to any fake clients, however they _should_ be sent to SourceTV/GOTV fake clients because messages they receive are actually visible to broadcast viewers and in demos recorded with `tv_record`. 

Player chat messages as well as SM functions like `PrintToChat`/`PrintToChatAll` broadcast to TV clients, but `ShowActivity` does not.
2018-05-09 09:13:49 +01:00
Michael Flaherty
5611ec54a2 Migrate extensions to common AMTL string funcs (#785) 2018-03-25 13:00:53 -07:00
Michael Flaherty
956f264b85 Replace ke::SafeSprintf with ke::SafeStrcpy (#784) 2018-03-19 20:12:51 +00:00
peace-maker
f9faf9e48c Allow different values per platform in "Keys" gamedata section (#765)
This adds support for platform specific custom key values in the `Keys` section in game config files. Now you can have different values for the same key per platform.

Previously you could only add general key values in gamedata files that were the same on all platforms like
```
"Keys"
{
	"key"	"value"
}
```

This patch allows you to set the value per platform in a subsection like
```
"Keys"
{
	"key"
	{
		"windows"	"value1"
		"linux"	"value2"
		"mac"	"value3"
	}
}
```

Looking up the `key` will return the value matching the host platform.
2018-02-06 14:40:51 +00:00
Ruben Gonzalez
5a35760215
Merge pull request #744 from alliedmodders/show-required-exts
Address issue #737
2017-12-31 11:06:35 -05:00
Ruben Gonzalez
40356fc9db Address issue #737 2017-12-30 14:08:56 -05:00
Kyle Sanderson
de108cca44
Simplify Logger internals (Fixes Issue #663). (#691)
* Simplify Logger internals (Issue #663).

* Avoid reformatting strings on every call.
2017-12-29 19:56:25 -08:00
Kyle Sanderson
5f5a6b3a16
Migrate CDataPack from a Compact Cassette tape. (#688)
* Migrate CDataPack from a Cassette Tape.

Tested-By: Headline22.

* Remove last IsReadable param pass.

* populate len still if CDataPack::ReadString is unreadable or the wrong type.

* Fyren Fixes(TM)(R)(C).

* Deprecate IDataPack.
2017-12-29 19:56:02 -08:00
Scott Ehlert
ce1a4dcac0
64-bit support for CSGO on Linux and macOS (#705) 2017-12-20 01:56:23 -06:00
Ruben Gonzalez
c87afde1bd Add optional extensions not found to sm exts list in a seperate list. 2017-11-30 14:21:19 -05:00
Ruben Gonzalez
51cea0e04e Only show extensions that failed to load if the extension is required. 2017-11-30 12:57:12 -05:00
Michael Flaherty
d685f30847 Add Translation Natives (#669)
* Add Translation Natives

See #626

* Fix vocab errors
* Better description
* Bump ITranslator Version
* Implement KyleS' Review Requests
* Improve documentation
2017-11-20 21:24:01 -08:00
Michael Flaherty
43cdf20fd3 Add FrameIterator to SourceMod (#716).
* Create FrameIterator type
This commit adds the FrameIterator type to core sm along with a few
methods around getting the information for each frame.

* Fix incorrect documentation
[skip ci]
* Implement KyleS's Changes
* A nit
2017-11-16 18:55:37 -08:00
Nicholas Hastings
95afe72307
Separate out DOI build. (#718) 2017-11-03 15:45:16 -04:00
Asher Baker
f156d48f45
Include missing ctype header for macOS build 2017-10-28 12:51:55 +01:00
Michael Flaherty
90ddc16a4b Lowercase windows/mac paths to avoid plugin duplicate loadings (Bug 6491) (#709) 2017-10-28 12:44:25 +01:00
FlaminSarge
c3b25e54f8 Add convenience logic for "offset" to Address definitions in GameConf (#580)
Allows for the last "read" offset for an Address to instead be "offset", which doesn't deref the addr pointer after applying the offset
Shortens the necessary coding to get a particular Address inside a function (old: store offset in a separate GameConf Offsets entry, apply the offset to the Address in SP)
2017-10-28 12:11:32 +01:00
Asher Baker
4bab834716
Merge pull request #672 from peace-maker/null_natives_fixed
Add natives to check for NULL_VECTOR and NULL_STRING
2017-10-27 20:03:09 +01:00
Michael Flaherty
4f54df65e9 Switch C header & Fix warnings (#702) 2017-10-15 10:32:01 +01:00
Scott Ehlert
bbdecceb4b Switch to AMBuild 2.1 API. (#694) 2017-10-02 07:18:57 -05:00
Asher Baker
4e996a116d Allow seeking to end of datapack (#687) 2017-09-19 23:27:35 +01:00
Peace-Maker
7eef3948b1 Don't break backwards compatibility with unmanaged forwards
Instead of adding new functions to `IForward`, we just allow NULL to be passed to `PushArray` and `PushString`.
2017-08-25 23:23:50 +02:00
Peace-Maker
e609a33e6d Cleanup CForward::Execute using a helper function
Flatten out the nesting a bit.
2017-08-25 23:23:37 +02:00
Peace-Maker
41a9889cdd Add Call_PushNullVector and Call_PushNullString
Be able to push NULL_[VECTOR|STRING] to a forward or direct function call.
The callee can check the parameter using the IsNullVector/IsNullString natives.
2017-08-25 23:23:24 +02:00
Peace-Maker
3de269946c Add IsNativeParamNullVector and IsNativeParamNullString natives
Lets plugins check if some other plugin passed NULL_VECTOR or
NULL_STRING to a native in the native callback.
2017-08-25 23:23:07 +02:00
Peace-Maker
9fa4ed8bac Add IsNullVector and IsNullString natives
Let plugins check if a string or vector passed to a function is their
NULL_VECTOR or NULL_STRING.
2017-08-25 23:22:39 +02:00
Asher Baker
11aab699a5 Revert "Add natives to check for NULL_VECTOR and NULL_STRING" 2017-08-04 00:44:47 +01:00
Asher Baker
e4047c3f87 Merge pull request #606 from peace-maker/null_natives
Add natives to check for NULL_VECTOR and NULL_STRING
2017-07-25 19:19:26 +01:00
Peace-Maker
60320cd845 Cleanup CForward::Execute using a helper function
Flatten out the nesting a bit.
2017-07-22 23:08:31 +02:00
Nicholas Hastings
9a6900a0ba Don't let bots bypass the kick queue. It's not always safe. 2017-06-23 14:43:39 -04:00
Peace-Maker
de42dfc783 Add Call_PushNullVector and Call_PushNullString
Be able to push NULL_[VECTOR|STRING] to a forward or direct function call.
The callee can check the parameter using the IsNullVector/IsNullString natives.
2017-05-04 22:56:31 -06:00
Peace-Maker
b67da15b5b Add IsNativeParamNullVector and IsNativeParamNullString natives
Lets plugins check if some other plugin passed NULL_VECTOR or
NULL_STRING to a native in the native callback.
2017-03-03 11:47:03 -07:00
Peace-Maker
c1888c2d05 Add IsNullVector and IsNullString natives
Let plugins check if a string or vector passed to a function is their
NULL_VECTOR or NULL_STRING.
2017-03-03 11:45:39 -07:00
peace-maker
86363dd3ec Add ADT array blocksize getter (#578)
Add GetArrayBlockSize and GetStackBlockSize and equivalent properties to
the methodmaps to get the blocksize the array or stack was created with.

Useful when getting array handles from other plugins you didn't create
yourself.
2017-02-09 19:26:14 +00:00
peace-maker
ea8fdd8fbb Fix crash when a database transaction fails (bug 6531) (#577)
If one of the queries fails in a transaction, the DBI system would only allocate an array of the size of the amount of all the successful queries before the failed one. It writes data for all the queries though effectively writing past the array bounds leading to heap corruption.

Create the right sized array!
2017-01-22 22:27:31 -08:00
Nicholas Hastings
ee501058fb Fix Panel.Style getter not being bound. 2016-12-12 08:52:26 -05:00
peace-maker
b74573fa12 Fix crash in CloneArray for too large arrays (#566)
If there is not enough memory to clone an array, throw an error instead
of crashing the server.
2016-12-11 20:55:11 -08:00
peace-maker
d3d16a93cf Fix threaded query's result handle access rights (#567)
Plugins were able to close the results handle in the threaded query
callback causing a double free crash. The access rights are setup right
before the handle is created, but weren't used.
2016-12-11 16:35:53 -08:00
Peace-Maker
4a8068d1c4 Suppress logging of "Plugin not runnable" errors
SourceMod itself and thirdparty extensions call functions in plugins
without making sure it is runnable. The plugin pausing feature isn't
supported anymore and is set to get nuked #438 which will reduce the
amount of not-runnable error reports.

We can't fix every third party extension, so suppressing the error from
the logs will stop the spam until pausing is removed.

#489 can be reverted after this.
2016-10-26 23:48:56 -06:00
Asher Baker
215599b90f Merge PR #489: Do not call functions in paused plugins
This should be reverted when pausing is removed, see PR discussion.
2016-10-03 16:51:45 +01:00
Kyle Sanderson
2deaa666f3 Fix erroneous () in DebugReport:: printouts. (#517) 2016-10-03 16:29:51 +01:00
Asher Baker
47dd2870d9 Merge pull request #476 from alliedmodders/query-format
Implement an auto-escaping Format native for SQL query construction
2016-10-03 16:20:01 +01:00
David Anderson
27e812461f Update to the latest SourcePawn and AMTL. 2016-09-24 16:45:04 -07:00
Peace-Maker
ecbedb7b11 Don't expose CellArrays in ISourceMod to extensions
Don't let extensions have access to the internal implementation of cell
arrays.
2016-08-26 15:09:18 -07:00
Peace-Maker
5b9ae5917b Add ICellArray and create/free in ISourceMod
Add an ICellArray interface to expose the adt_array CellArray class from
logic to core.
Add methods to ISourceMod to create and delete ICellArray instances in
logic.
2016-08-21 21:32:23 +02:00