Files
bitchx/dll/nap/dragonap/napi/main.c
Kevin Easton 28febcfea9 Initial import of the ircii-pana-1.1-final source tree.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/tags/ircii-pana-1.1-final@1 13b04d17-f746-0410-82c6-800466cd88b0
2008-02-25 09:25:32 +00:00

28 lines
496 B
C

/*
napster code base by Drago (drago@0x00.org)
released: 11-30-99
*/
#include "napi.h"
void motdhook(char *s) {
printf("MOTD: %s\n", s);
}
void statshook(_N_STATS *s) {
printf("Stats: Libraries==%d Songs==%d Gigs==%d\n", s->libraries, s->songs, s->gigs);
}
int main(void) {
_N_SERVER *s;
_N_AUTH a={"dragotest", "nap"};
n_SetMotdHook(motdhook);
n_SetStatsHook(statshook);
s=n_GetServer();
if (!n_Connect(s, &a)) {
printf("Error connecting\n");
return 1;
}
while(1) n_Loop();
}