- if (mode_on)
- {
- static char m[3];
- m[0] = mode;
- m[1] = '\0';
- if (!strchr(this->custom_modes,mode))
- {
- strlcat(custom_modes,m,MAXMODES);
- }
- log(DEBUG,"Custom mode %c set",mode);
- }
- else {
-
- std::string a = this->custom_modes;
- int pos = a.find(mode);
- a.erase(pos,1);
- strlcpy(this->custom_modes,a.c_str(),MAXMODES);
-
- log(DEBUG,"Custom mode %c removed: modelist='%s'",mode,this->custom_modes);