00001 #include "server.h" 00002 00003 static int match_botnick(const char *nick) 00004 { 00005 return current_server.nick && !(current_server.strcmp)(current_server.nick, nick); 00006 } 00007 00008 void *server_get_api() 00009 { 00010 static egg_server_api_t api; 00011 00012 api.major = EGG_SERVER_API_MAJOR; 00013 api.minor = EGG_SERVER_API_MINOR; 00014 00015 /* General stuff. */ 00016 api.match_botnick = match_botnick; 00017 00018 /* Output functions. */ 00019 api.printserv = printserv; 00020 api.queue_append = queue_append; 00021 api.queue_unlink = queue_unlink; 00022 api.queue_entry_from_text = queue_entry_from_text; 00023 api.queue_entry_to_text = queue_entry_to_text; 00024 api.queue_entry_cleanup = queue_entry_cleanup; 00025 api.queue_get_by_priority = queue_get_by_priority; 00026 api.dequeue_messages = dequeue_messages; 00027 00028 /* Channel functions. */ 00029 api.channel_lookup = channel_lookup; 00030 api.channel_add = channel_add; 00031 api.channel_set = channel_set; 00032 api.channel_get = channel_get; 00033 api.channel_get_int = channel_get_int; 00034 00035 return(&api); 00036 }