+ CLIENT *prefix, *target = NULL;
+
+ /* Determine target */
+ if (Req->argc > 0) {
+ if (strcmp(Req->argv[0], "*") != 0)
+ target = Client_Search(Req->argv[0]);
+ else
+ target = Client_ThisServer();
+ }
+
+ if (!target) {
+ /* Status code without target!? */
+ if (Req->argc > 0)
+ Log(LOG_WARNING,
+ "Unknown target for status code %s: \"%s\"",
+ Req->command, Req->argv[0]);
+ else
+ Log(LOG_WARNING,
+ "Unknown target for status code %s!",
+ Req->command);
+ return true;
+ }
+ if (target == Client_ThisServer()) {
+ /* This server is the target of the numeric */
+ num = atoi(Req->command);
+
+ for (i = 0; i < (int) C_ARRAY_SIZE(Numerics); i++) {
+ if (num == Numerics[i].numeric) {
+ if (!Numerics[i].function)
+ return CONNECTED;
+ return Numerics[i].function(client, Req);
+ }
+ }
+
+ LogDebug("Ignored status code %s from \"%s\".",
+ Req->command, Client_ID(client));
+ return true;
+ }
+
+ /* Determine source */
+ if (! Req->prefix[0]) {
+ /* Oops, no prefix!? */
+ Log(LOG_WARNING, "Got status code %s from \"%s\" without prefix!?",
+ Req->command, Client_ID(client));
+ return true;
+ }
+
+ prefix = Client_Search(Req->prefix);
+ if (! prefix) { /* Oops, unknown prefix!? */
+ Log(LOG_WARNING, "Got status code %s from unknown source: \"%s\"", Req->command, Req->prefix);
+ return true;
+ }
+
+ /* Forward status code */
+ strlcpy(str, Req->command, sizeof(str));
+ for (i = 0; i < Req->argc; i++) {
+ if (i < Req->argc - 1)
+ strlcat(str, " ", sizeof(str));
+ else
+ strlcat(str, " :", sizeof(str));
+ strlcat(str, Req->argv[i], sizeof(str));
+ }
+ return IRC_WriteStrClientPrefix(target, prefix, "%s", str);
+}
+
+static bool
+Handle_Request( CONN_ID Idx, REQUEST *Req )
+{
+ CLIENT *client;
+ bool result = true;
+ int client_type;