#include #include #include #include #include #include using namespace std; int startWinsock(void); int zjoin(SOCKET s,std::string chan); int zsend(SOCKET s,std::string msg); int zmsg(SOCKET s,std::string chan,std::string msg); int zkick(SOCKET s,std::string chan,std::string nick,std::string re); int znotice(SOCKET s,std::string nick,std::string msg); int zban(SOCKET s,std::string nick,std::string address,std::string chan,std::string re); int zadmintest(std::string id,std::string chan); std::string zsad(std::string strLong,std::string strS); std::string zersetz(std::string strLong,std::string strS,std::string strnew); int zmodetest(std::string chan); int zkicktest(std::string chan); std::string adminlist; std::string banlist; std::string kickpro; std::string modepro; struct database { std::string nick; std::string id; }; int main() { ::adminlist += "Oo"; long rc; SOCKET s; SOCKADDR_IN addr; int auth = 0; database me; me.id = "cpppp"; me.nick = "FloOwnt"; std::string buf,buf2,nick,id,address,mode,addresse,msg,re,chan,buf3,knick,qnet,mode2,buf4,Lkick,kbnick,kbaddress,kbchan; int io; rc=startWinsock(); s=socket(AF_INET,SOCK_STREAM,0); memset(&addr,0,sizeof(SOCKADDR_IN)); // zuerst alles auf 0 setzten addr.sin_family=AF_INET; addr.sin_port=htons(6667); // irc server port addr.sin_addr.s_addr=inet_addr("193.213.112.155"); // irc server ip rc=connect(s,(SOCKADDR*)&addr,sizeof(SOCKADDR)); zsend(s,("NICK "+me.nick+"\r\n")); zsend(s,("USER"+me.id+" Bot\r\n")); while(1) { char cbuf[1024] = ""; rc=recv(s,cbuf,1023,0); buf = cbuf; cout<