Logo Search packages:      
Sourcecode: sbnc version File versions  Download package

bool CUser::SetTagString ( const char *  Tag,
const char *  Value 


Sets a tag's value.

Tag the name of the tag
Value the new value

Definition at line 1846 of file User.cpp.

References CVector< Type >::GetLength(), CCore::GetModules(), m_Config, and CConfig::WriteString().

Referenced by SetTagInteger().

      bool ReturnValue;
      char *Setting;
      const CVector<CModule *> *Modules;

      if (Tag == NULL) {
            return false;

      asprintf(&Setting, "tag.%s", Tag);

      CHECK_ALLOC_RESULT(Setting, asprintf) {
            return false;

      Modules = g_Bouncer->GetModules();

      for (unsigned int i = 0; i < Modules->GetLength(); i++) {
            (*Modules)[i]->UserTagModified(Tag, Value);

      ReturnValue = m_Config->WriteString(Setting, Value);

      Modules = g_Bouncer->GetModules();

      return ReturnValue;

Generated by  Doxygen 1.6.0   Back to index