View Single Post
ThatOneGuy
Veteran Member
Join Date: Jul 2012
Location: Oregon, USA
Old 06-17-2020 , 00:59   Re: [ANY] Discord/Slack API (CallAdmin, SourceBans, ...)
Reply With Quote #161

I was using this to post chat messages to discord. I found that the plugin wasn't escaping things properly for some characters in the include file function Discord_EscapeString.

I replaced the function as follows and it worked.

PHP Code:
stock void Discord_EscapeString(char[] stringint maxlen)
{
    
ReplaceString(stringmaxlen"@""@");
    
ReplaceString(stringmaxlen"'""\\'");

The double quote didnt appear to need escape.
__________________

Last edited by ThatOneGuy; 06-17-2020 at 01:06.
ThatOneGuy is offline