mirror of
https://github.com/znc/znc.git
synced 2026-07-21 09:03:32 +02:00
Fixed modtcl result fetching from the interpreter.
Tcl 8.6 no longer supports accessing the result field directly, so we now use the public getter. Thanks to flakes for finding this. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1970 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -106,8 +106,7 @@ public:
|
||||
if (!sMyArgs.empty()) {
|
||||
i = Tcl_EvalFile(interp, sMyArgs.c_str());
|
||||
if (i != TCL_OK) {
|
||||
result = interp->result;
|
||||
PutModule(CString(result));
|
||||
PutModule(Tcl_GetStringResult(interp));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,8 +139,7 @@ public:
|
||||
while (Tcl_DoOneEvent(TCL_DONT_WAIT)) {}
|
||||
i = Tcl_Eval(interp,"Binds::ProcessTime");
|
||||
if (i != TCL_OK) {
|
||||
result = interp->result;
|
||||
PutModule(CString(result));
|
||||
PutModule(Tcl_GetStringResult(interp));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,8 +181,7 @@ public:
|
||||
CString sCommand = "Binds::ProcessPubm {" + sNick + "} {" + sHost + "} - {" + sChannel + "} {" + sMes + "}";
|
||||
i = Tcl_Eval(interp, sCommand.c_str());
|
||||
if (i != TCL_OK) {
|
||||
result = interp->result;
|
||||
PutModule(CString(result));
|
||||
PutModule(Tcl_GetStringResult(interp));
|
||||
}
|
||||
return CONTINUE;
|
||||
}
|
||||
@@ -201,8 +198,7 @@ public:
|
||||
sCommand = "Binds::ProcessNick {" + sOldNick + "} {" + sHost + "} - {" + vChans[n]->GetName() + "} {" + sNewNickTmp + "}";
|
||||
i = Tcl_Eval(interp, sCommand.c_str());
|
||||
if (i != TCL_OK) {
|
||||
result = interp->result;
|
||||
PutModule(CString(result));
|
||||
PutModule(Tcl_GetStringResult(interp));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -215,8 +211,7 @@ public:
|
||||
CString sCommand = "Binds::ProcessKick {" + sOpNick + "} {" + sOpHost + "} - {" + Channel.GetName() + "} {" + sNick + "} {" + sMessage + "}";
|
||||
i = Tcl_Eval(interp, sCommand.c_str());
|
||||
if (i != TCL_OK) {
|
||||
result = interp->result;
|
||||
PutModule(CString(result));
|
||||
PutModule(Tcl_GetStringResult(interp));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,7 +219,6 @@ public:
|
||||
private:
|
||||
Tcl_Interp *interp;
|
||||
int i;
|
||||
char *result;
|
||||
|
||||
static CString argvit(const char *argv[], unsigned int end, unsigned int begin, CString delim) {
|
||||
CString sRet;
|
||||
|
||||
Reference in New Issue
Block a user