+ if (name == params[0])
+ {
+ swhois = Conf->ReadValue("oper", "swhois", i);
+ break;
+ }
+ }
+
+ if (!swhois.length())
+ {
+ for (int i = 0; i < Conf->Enumerate("type"); i++)
+ {
+ std::string type = Conf->ReadValue("type", "name", i);
+
+ if (type == user->oper)
+ {
+ swhois = Conf->ReadValue("type", "swhois", i);
+ break;
+ }
+ }
+ }
+
+ std::string *old;
+ if (user->GetExt("swhois", old))
+ {
+ user->Shrink("swhois");
+ delete old;
+ }
+
+ if (!swhois.length())
+ return;
+
+ std::string *text = new std::string(swhois);
+ user->Extend("swhois", text);
+ ServerInstance->PI->SendMetaData(user, TYPE_USER, "swhois", *text);