mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-06-16 07:07:13 +02:00
Implement methods to send messages with style formatting in the IRC module. Should close #7
Also remove duplicate code in raw squirrel functions by merging it into one function.
This commit is contained in:
4
external/LibIRC/colors.c
vendored
4
external/LibIRC/colors.c
vendored
@ -246,7 +246,7 @@ static int libirc_colorparser_colorlookup (const char * color)
|
||||
/*
|
||||
* [code] to IRC color conversion.
|
||||
*/
|
||||
char * irc_color_convert_to_mirc (const char * source)
|
||||
char * irc_color_convert_to_mirc (const char * source, void * (*memory_allocator)(size_t))
|
||||
{
|
||||
unsigned int destlen = 0;
|
||||
char * destline = 0, *d = 0;
|
||||
@ -262,7 +262,7 @@ char * irc_color_convert_to_mirc (const char * source)
|
||||
if ( destlen > 0 )
|
||||
{
|
||||
// This is the 2nd pass; allocate memory.
|
||||
if ( (destline = malloc (destlen)) == 0 )
|
||||
if ( (destline = memory_allocator (destlen)) == 0 )
|
||||
return 0;
|
||||
|
||||
d = destline;
|
||||
|
Reference in New Issue
Block a user