#include "client.h"
#include "common.h"
#include "hash.h"
-#include "irc_string.h"
+#include "match.h"
#include "ircd.h"
#include "numeric.h"
#include "send.h"
HASH_WALK_END
}
-void\r
-add_to_cli_fd_hash(struct Client *client_p)\r
-{\r
- rb_dlinkAddAlloc(client_p, &clientbyfdTable[hash_cli_fd(rb_get_fd(client_p->localClient->F))]);\r
-}\r
-\r
-\r
-void\r
-del_from_cli_fd_hash(struct Client *client_p)\r
-{\r
- unsigned int hashv;\r
- hashv = hash_cli_fd(rb_get_fd(client_p->localClient->F));\r
- rb_dlinkFindDestroy(client_p, &clientbyfdTable[hashv]);\r
-}\r
-\r
-struct Client *\r
-find_cli_fd_hash(int fd)\r
-{\r
- struct Client *target_p;\r
- rb_dlink_node *ptr;\r
- unsigned int hashv;\r
- hashv = hash_cli_fd(fd);\r
- RB_DLINK_FOREACH(ptr, clientbyfdTable[hashv].head)\r
- {\r
- target_p = ptr->data;\r
- if(rb_get_fd(target_p->localClient->F) == fd)\r
- return target_p;\r
- }\r
- return NULL; \r
+void
+add_to_cli_fd_hash(struct Client *client_p)
+{
+ rb_dlinkAddAlloc(client_p, &clientbyfdTable[hash_cli_fd(rb_get_fd(client_p->localClient->F))]);
+}
+
+
+void
+del_from_cli_fd_hash(struct Client *client_p)
+{
+ unsigned int hashv;
+ hashv = hash_cli_fd(rb_get_fd(client_p->localClient->F));
+ rb_dlinkFindDestroy(client_p, &clientbyfdTable[hashv]);
+}
+
+struct Client *
+find_cli_fd_hash(int fd)
+{
+ struct Client *target_p;
+ rb_dlink_node *ptr;
+ unsigned int hashv;
+ hashv = hash_cli_fd(fd);
+ RB_DLINK_FOREACH(ptr, clientbyfdTable[hashv].head)
+ {
+ target_p = ptr->data;
+ if(rb_get_fd(target_p->localClient->F) == fd)
+ return target_p;
+ }
+ return NULL;
}
static void