use newCONSTSUB for these

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@314 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
imaginos
2005-05-16 02:10:42 +00:00
parent e4a2c7aa8f
commit 21af04df7d
+9 -4
View File
@@ -747,10 +747,15 @@ bool CModPerl::OnLoad( const CString & sArgs )
// this sets up the eval CB that we call from here on out. this way we can grab the error produced
SetupZNCScript();
Eval( "use constant CONTINUE => " + PString( CONTINUE ) + ";" );
Eval( "use constant HALT => " + PString( HALT ) + ";" );
Eval( "use constant HALTMODS => " + PString( HALTMODS ) + ";" );
Eval( "use constant HALTCORE => " + PString( HALTCORE ) + ";" );
HV *pZNCSpace = get_hv ( "ZNC::", TRUE);
if ( !pZNCSpace )
return( false );
newCONSTSUB ( pZNCSpace, "CONTINUE", newSViv (CONTINUE) );
newCONSTSUB ( pZNCSpace, "HALT", newSViv (HALT) );
newCONSTSUB ( pZNCSpace, "HALTMODS", newSViv (HALTMODS) );
newCONSTSUB ( pZNCSpace, "HALTCORE", newSViv (HALTCORE) );
if ( !sArgs.empty() )
{