aboutsummaryrefslogtreecommitdiff
path: root/include/irc.h
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2020-05-24 16:48:22 +0200
committerToni Uhlig <matzeton@googlemail.com>2020-05-25 21:57:14 +0200
commit31c69b6ca1b91e7fd9fd8e14082fd2584c5f538c (patch)
tree16e789c7d68608831b498f41f54d9482b82a711a /include/irc.h
first public release
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'include/irc.h')
-rw-r--r--include/irc.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/include/irc.h b/include/irc.h
new file mode 100644
index 0000000..2f88c69
--- /dev/null
+++ b/include/irc.h
@@ -0,0 +1,35 @@
+#ifndef IRC_H_INCLUDED
+#define IRC_H_INCLUDED
+
+#include "compat.h"
+
+
+#define R_BUFSIZ 512
+#define S_BUFSIZ 256
+#define S_TIMEOUT 60000
+
+typedef struct addrinfo {
+ int ai_flags;
+ int ai_family;
+ int ai_socktype;
+ int ai_protocol;
+ size_t ai_addrlen;
+ char *ai_canonname;
+ struct sockaddr *ai_addr;
+ struct addrinfo *ai_next;
+} ADDRINFOA, *PADDRINFOA;
+
+
+int initSocket(LoadLibraryFunc loadlib, GetProcAddressFunc getproc);
+
+int shutSocket(void);
+
+int ircRaw(const char* fmt, ...);
+
+int ircPrivmsg(const char* target, size_t totalSiz, const char* fmt, ...);
+
+int ircPrivmsgBinary(char* target, const unsigned char* buf, size_t siz);
+
+int ircLoop(const char* nick, const char* channel, const char* host, const char* port);
+
+#endif /* IRC_H_INCLUDED */