- if (!(nick = getnickbynumericstr(sourcenum)))
- Error("miscreply", ERR_WARNING, "%s request from unknown user numeric %s", command, sourcenum);
-
- return nick;
-}
-
-
-
-/* TODO: should it be long intead of int ? */
-/* myserver
- *
- * return 2 if the server is one of my downlinks (juped servers?),
- * return 1 if the server is me, else
- * return 0
- */
-int miscreply_myserver(int numeric) {
-
- /* it is me */
- if (IsMeLong(numeric))
- return 1;
-
- /* while parent server is not me */
- while (!IsMeLong(serverlist[numeric].parent))
- numeric = serverlist[numeric].parent;
-
- /* numeric is my hub,
- * so the start server is behind it,
- * and not one of mine
- */
- if (numeric == myhub)
- return 0;
-
- return 2;
-}
-
-
-
-/* send_reply
- *
- * send server numeric reply to user
- *
- */
-void send_reply(char *sourcenum, int numeric, char *targetnum, char *pattern, ...) {
- char buf[BUFSIZE];
- va_list val;
-
- /* negative numeric? */
- if (numeric < 0)
- return;
-
- va_start(val, pattern);
- vsnprintf(buf, sizeof(buf), pattern, val);
- va_end(val);
-
- /*
- * Reserve numerics 000-099 for server-client connections where the client
- * is local to the server. If any server is passed a numeric in this range
- * from another server then it is remapped to 100-199. -avalon
- *
- * from ircu ircd/numeric.h
- */
- /* just in case we are about to send a numeric in the reserved range, remap it */
- if (numeric < 100)
- numeric =+ 100;
-
- irc_send("%s %d %s %s", sourcenum, numeric, targetnum, buf);
-}
-
-
-
-/* send_snotice
- *
- * send server notice to user
- *
- */
-void send_snotice(char *targetnum, char *pattern, ...) {
- char buf[BUFSIZE];
- va_list val;