** the old. 'name' is now assumed to be a null terminated
** string and the search is the for server and user.
*/
-aClient *find_client (name, cptr)
- char *name;
- aClient *cptr;
+aClient *find_client (char *name, aClient *cptr)
{
if (name)
cptr = hash_find_client (name, cptr);
return cptr;
}
-aClient *find_nickserv (name, cptr)
- char *name;
- aClient *cptr;
+aClient *find_nickserv (char *name, aClient *cptr)
{
if (name)
cptr = hash_find_nickserver (name, cptr);
** the old. 'name' is now assumed to be a null terminated
** string.
*/
-aClient *find_server (name, cptr)
- char *name;
- aClient *cptr;
+aClient *find_server (char *name, aClient *cptr)
{
if (name)
cptr = hash_find_server (name, cptr);
return cptr;
}
-aClient *find_name (name, cptr)
- char *name;
- aClient *cptr;
+aClient *find_name (char *name, aClient *cptr)
{
aClient *c2ptr = cptr;
/*
** Find person by (nick)name.
*/
-aClient *find_person (name, cptr)
- char *name;
- aClient *cptr;
+aClient *find_person (char *name, aClient *cptr)
{
aClient *c2ptr = cptr;
*
* NOTE: parse() should not be called recusively by any other fucntions!
*/
-int parse (cptr, buffer, bufend, mptr)
- aClient *cptr;
- char *buffer, *bufend;
- struct Message *mptr;
+int parse (aClient *cptr, char *buffer, char *bufend, struct Message *mptr)
{
aClient *from = cptr;
char *ch, *s;
/*
* field breakup for ircd.conf file.
*/
-char *getfield (newline)
- char *newline;
+char *getfield (char *newline)
{
static char *line = NULL;
char *end, *field;
return (field);
}
-static int cancel_clients (cptr, sptr, cmd)
- aClient *cptr, *sptr;
- char *cmd;
+static int cancel_clients (aClient *cptr, aClient *sptr, char *cmd)
{
-/* char *cmdpriv; Compiler says this is unused */
- /*
- * kill all possible points that are causing confusion here,
- * I'm not sure I've got this all right...
- * - avalon
- * No you didn't...
- * - Run
- */
- /* This little bit of code allowed paswords to nickserv to be
- * seen. A definite no-no. --Russell
- sendto_ops("Message (%s) for %s[%s!%s@%s] from %s", cmd,
- sptr->name, sptr->from->name, sptr->from->username,
- sptr->from->sockhost, get_client_name(cptr, TRUE));*/
/*
* Incorrect prefix for a server from some connection. If it is a
* client trying to be annoying, just QUIT them, if it is a server
* then the same deal.
*/
if (IsServer (sptr) || IsMe (sptr)) {
- /*
- * First go at tracking down what really causes the
- * dreaded Fake Direction error. It should not be possible
- * ever to happen. Assume nothing here since this is an
- * impossibility.
- *
- * Check for valid fields, then send out globops with
- * the msg command recieved, who apperently sent it,
- * where it came from, and where it was suppose to come
- * from. We send the msg command to find out if its some
- * bug somebody found with an old command, maybe some
- * weird thing like, /ping serverto.* serverfrom.* and on
- * the way back, fake direction? Don't know, maybe this
- * will tell us. -Cabal95
- *
- * Take #2 on Fake Direction. Most of them seem to be
- * numerics. But sometimes its getting fake direction on
- * SERVER msgs.. HOW?? Display the full message now to
- * figure it out... -Cabal95
- *
- * Okay I give up. Can't find it. Seems like it will
- * exist untill ircd is completely rewritten. :/ For now
- * just completely ignore them. Needs to be modified to
- * send these messages to a special oper channel. -Cabal95
- *
- aClient *from;
- char *fromname=NULL, *sptrname=NULL, *cptrname=NULL, *s;
-
- while (*cmd == ' ')
- cmd++;
- if (s = index(cmd, ' '))
- *s++ = '\0';
- if (!strcasecmp(cmd, "PRIVMSG") ||
- !strcasecmp(cmd, "NOTICE") ||
- !strcasecmp(cmd, "PASS"))
- s = NULL;
- if (sptr && sptr->name)
- sptrname = sptr->name;
- if (cptr && cptr->name)
- cptrname = cptr->name;
- if (sptr && sptr->from && sptr->from->name)
- fromname = sptr->from->name;
-
- sendto_serv_butone(NULL, ":%s GLOBOPS :"
- "Fake Direction: Message[%s %s] from %s via %s "
- "instead of %s (Tell Cabal95)", me.name, cmd,
- (s ? s : ""),
- (sptr->name!=NULL)?sptr->name:"<unknown>",
- (cptr->name!=NULL)?cptr->name:"<unknown>",
- (fromname!=NULL)?fromname:"<unknown>");
- sendto_ops(
- "Fake Direction: Message[%s %s] from %s via %s "
- "instead of %s (Tell Cabal95)", cmd,
- (s ? s : ""),
- (sptr->name!=NULL)?sptr->name:"<unknown>",
- (cptr->name!=NULL)?cptr->name:"<unknown>",
- (fromname!=NULL)?fromname:"<unknown>");
-
- * We don't drop the server anymore. Just ignore
- * the message and go about your business. And hope
- * we don't get flooded. :-) -Cabal95
- sendto_ops("Dropping server %s", cptr->name);
- return exit_client(cptr, cptr, &me, "Fake Direction");
- */
return 0;
}
/*
return exit_client (cptr, cptr, &me, "Fake prefix");
}
-static void remove_unknown (cptr, sender)
- aClient *cptr;
- char *sender;
+static void remove_unknown (aClient *cptr, char *sender)
{
if (!IsRegistered (cptr) || IsClient (cptr))
return;