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

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

SetTagString

Sets a tag's value.

Parameters:
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;
      } CHECK_ALLOC_RESULT_END;

      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