- /*
- * First up, check for any malformed commands (e.g. MODE without a timestamp)
- * and rewrite commands where necessary (SVSMODE -> MODE for services). -- w
- */
- if (command == "SVSMODE") // This isn't in an "else if" so we still force FMODE for changes on channels.
- command = "MODE";
-
- // TODO move all this into Commands
- if (command == "UID")
- {
- this->ParseUID(prefix, params);
- }
- else if (command == "FJOIN")
- {
- this->ForceJoin(prefix,params);
- }
- else if (command == "STATS")
- {
- this->Stats(prefix, params);
- }
- else if (command == "MOTD")
- {
- this->Motd(prefix, params);
- }
- else if (command == "ADMIN")
- {
- this->Admin(prefix, params);
- }
- else if (command == "MAP")
- {
- Utils->Creator->HandleMap(params, who);
- }
- else if (command == "SERVER")
- {
- this->RemoteServer(prefix,params);
- }
- else if (command == "ERROR")
- {
- this->Error(params);
- }
- else if (command == "OPERTYPE")
- {
- this->OperType(prefix,params);
- }
- else if (command == "AWAY")
- {
- this->Away(prefix,params);
- }
- else if (command == "FMODE")
- {
- this->ForceMode(prefix,params);
- }
- else if (command == "FTOPIC")
- {
- this->ForceTopic(prefix,params);
- }
- else if (command == "METADATA")
- {
- this->MetaData(prefix,params);
- }
- else if (command == "PING")
- {
- this->LocalPing(prefix,params);
- }
- else if (command == "PONG")
- {
- TreeServer *s = Utils->FindServer(prefix);
- if (s && s->bursting)
- {
- ServerInstance->SNO->WriteGlobalSno('l',"Server \002%s\002 has not finished burst, forcing end of burst (send ENDBURST!)", prefix.c_str());
- s->FinishBurst();
- }
- this->LocalPong(prefix,params);
- }
- else if (command == "VERSION")
- {
- this->ServerVersion(prefix,params);
- }
- else if (command == "FHOST")
- {
- this->ChangeHost(prefix,params);
- }
- else if (command == "FNAME")
- {
- this->ChangeName(prefix,params);
- }
- else if (command == "FIDENT")
- {
- this->ChangeIdent(prefix,params);
- }
- else if (command == "ADDLINE")
- {
- this->AddLine(prefix,params);
- }
- else if (command == "DELLINE")
- {
- this->DelLine(prefix,params);
- }
- else if (command == "SVSNICK")
- {
- this->SVSNick(prefix,params);
- }
- else if (command == "SAVE")
- {
- this->ForceNick(prefix,params);
- }
- else if (command == "OPERQUIT")
- {
- this->OperQuit(prefix,params);
- }
- else if (command == "IDLE")
- {
- this->Whois(prefix,params);
- }
- else if (command == "PUSH")
- {
- this->Push(prefix,params);
- }
- else if (command == "TIME")
- {
- this->Time(prefix,params);
- }
- else if (command == "SVSJOIN")
- {
- this->ServiceJoin(prefix,params);
- }
- else if (command == "SVSPART")
- {
- this->ServicePart(prefix,params);
- }
- else if (command == "SQUIT")