000
23.01.2009, 17:28 Uhr
~hadywadydudeda
Gast
|
Hasllo,
Wie der titel schon sagt, will ich mit cpp einen irc bot programmieren: Einen Fehler habe ich hier:
Code: |
void authentificate () { string atmp = ""; char buf [8000]; int sock = client (remote_ip, 6667); if (sock == -1) { cout << "error" << endl; exit(1); } sendc (sock, auth_user+nl); sendc (sock, auth_pass+nl); sendc (sock, channel+nl); sendc (sock, priv+welcome+nl);
for (;;) { sendc (sock, priv+"hy\r\n"); recv (sock, buf, 5000, 0); cout << "t: " << buf << endl <<endl; printf("%s\n", buf); } }
|
Der Bot loggt sich schön ein. ER sendet die willkommensnachricht. Sobald ein anderer User einen Text in den IRC schreibt, so schreibt der bot "hy". Jedoch liest der bot irgendwie einfach nichts aus.
ich ahbe die ausgabe von buf mti cout und printf versucht auszugeben => da kommt nichts! das ist aber nicht möglich, da andere user (auch ich) definitiv was im channel schreiben!!!
könnt ihr mir weiterhelfen?
danke! |