mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-02-21 20:27:13 +01:00
Update the IRC module to comply with the new StackStrF changes.
This commit is contained in:
parent
3f8e95fabc
commit
d39c08fe71
@ -33,9 +33,9 @@ void IrcFreeMem(void * p)
|
||||
static SQInteger SqGetNick(HSQUIRRELVM vm)
|
||||
{
|
||||
// Attempt to retrieve the value from the stack as a string
|
||||
StackStrF val(vm, 2, true);
|
||||
StackStrF val(vm, 2);
|
||||
// Have we failed to retrieve the string?
|
||||
if (SQ_FAILED(val.mRes))
|
||||
if (SQ_FAILED(val.Proc(true)))
|
||||
{
|
||||
return val.mRes; // Propagate the error!
|
||||
}
|
||||
@ -51,9 +51,9 @@ static SQInteger SqGetNick(HSQUIRRELVM vm)
|
||||
static SQInteger SqGetHost(HSQUIRRELVM vm)
|
||||
{
|
||||
// Attempt to retrieve the value from the stack as a string
|
||||
StackStrF val(vm, 2, true);
|
||||
StackStrF val(vm, 2);
|
||||
// Have we failed to retrieve the string?
|
||||
if (SQ_FAILED(val.mRes))
|
||||
if (SQ_FAILED(val.Proc(true)))
|
||||
{
|
||||
return val.mRes; // Propagate the error!
|
||||
}
|
||||
@ -69,9 +69,9 @@ static SQInteger SqGetHost(HSQUIRRELVM vm)
|
||||
static SQInteger SqStripColorFromMIRC(HSQUIRRELVM vm)
|
||||
{
|
||||
// Attempt to retrieve the value from the stack as a string
|
||||
StackStrF val(vm, 2, true);
|
||||
StackStrF val(vm, 2);
|
||||
// Have we failed to retrieve the string?
|
||||
if (SQ_FAILED(val.mRes))
|
||||
if (SQ_FAILED(val.Proc(true)))
|
||||
{
|
||||
return val.mRes; // Propagate the error!
|
||||
}
|
||||
@ -94,9 +94,9 @@ static SQInteger SqStripColorFromMIRC(HSQUIRRELVM vm)
|
||||
static SQInteger SqConvertColorFromMIRC(HSQUIRRELVM vm)
|
||||
{
|
||||
// Attempt to retrieve the value from the stack as a string
|
||||
StackStrF val(vm, 2, true);
|
||||
StackStrF val(vm, 2);
|
||||
// Have we failed to retrieve the string?
|
||||
if (SQ_FAILED(val.mRes))
|
||||
if (SQ_FAILED(val.Proc(true)))
|
||||
{
|
||||
return val.mRes; // Propagate the error!
|
||||
}
|
||||
@ -119,9 +119,9 @@ static SQInteger SqConvertColorFromMIRC(HSQUIRRELVM vm)
|
||||
static SQInteger SqConvertColorToMIRC(HSQUIRRELVM vm)
|
||||
{
|
||||
// Attempt to retrieve the value from the stack as a string
|
||||
StackStrF val(vm, 2, true);
|
||||
StackStrF val(vm, 2);
|
||||
// Have we failed to retrieve the string?
|
||||
if (SQ_FAILED(val.mRes))
|
||||
if (SQ_FAILED(val.Proc(true)))
|
||||
{
|
||||
return val.mRes; // Propagate the error!
|
||||
}
|
||||
|
@ -700,7 +700,7 @@ void Session::ForwardEvent(Function & listener, CCStr event, CCStr origin, CCStr
|
||||
// Attempt top execute the callback with the obtained values
|
||||
try
|
||||
{
|
||||
listener.Execute< CSStr, CSStr, Array & >(event, origin, parameters);
|
||||
listener.Execute(event, origin, parameters);
|
||||
}
|
||||
catch (const Sqrat::Exception & e)
|
||||
{
|
||||
@ -744,7 +744,7 @@ void Session::ForwardEvent(Function & listener, Uint32 event,
|
||||
// Attempt top execute the callback with the obtained values
|
||||
try
|
||||
{
|
||||
listener.Execute< Uint32, CSStr, Array & >(event, origin, parameters);
|
||||
listener.Execute(event, origin, parameters);
|
||||
}
|
||||
catch (const Sqrat::Exception & e)
|
||||
{
|
||||
@ -1040,17 +1040,17 @@ static SQInteger FormattedIrcMessageCmd(HSQUIRRELVM vm, SendIrcMessageFunc send_
|
||||
}
|
||||
|
||||
// Attempt to retrieve the target from the stack as a string
|
||||
StackStrF target(vm, 2, false);
|
||||
StackStrF target(vm, 2);
|
||||
// Have we failed to retrieve the string?
|
||||
if (SQ_FAILED(target.mRes))
|
||||
if (SQ_FAILED(target.Proc(false)))
|
||||
{
|
||||
return target.mRes; // Propagate the error!
|
||||
}
|
||||
|
||||
// Attempt to retrieve the value from the stack as a string
|
||||
StackStrF message(vm, 3, true);
|
||||
StackStrF message(vm, 3);
|
||||
// Have we failed to retrieve the string?
|
||||
if (SQ_FAILED(message.mRes))
|
||||
if (SQ_FAILED(message.Proc(true)))
|
||||
{
|
||||
return message.mRes; // Propagate the error!
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user