void CScriptEdit::OnNew() { NewScript(); m_text_control.SetWindowText(""); UpdateData(UD_DISPLAY); CheckScript(FORCED_CHECK|WHOLE_CHECK); RefreshDialog(); }
int ScriptSys::RunStr( const char *str ) { Script *s = NewScript(); int ret = s->RunStr( str ); if( ret != LUA_YIELD ) { DelScript( s ); } NOTIFY_ERR( ret, m_MainState ); return ret; }
CIrcChannel::CIrcChannel(CBot *pParentBot, const std::string &strName) : m_bHasDetailedUsers(false) { m_pParentBot = pParentBot; m_strName = strName; for (CPool<CScript *>::iterator i = pParentBot->GetScripts()->begin(); i != pParentBot->GetScripts()->end(); ++i) { NewScript(*i); } }