init
This commit is contained in:
61
wastedump.c
Normal file
61
wastedump.c
Normal file
@@ -0,0 +1,61 @@
|
||||
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include "config.h"
|
||||
|
||||
#include "myfile.h"
|
||||
#include "nicklist.h"
|
||||
#include "wastedump.h"
|
||||
|
||||
extern char storebuf[];
|
||||
extern char *operchan[];
|
||||
extern time_t S_TIME;
|
||||
extern char *token[];
|
||||
extern time_t NOWTIME;
|
||||
extern char buf[];
|
||||
extern int botsck,sevsck;
|
||||
extern int noopers;
|
||||
extern char channel[];
|
||||
extern char comment[];
|
||||
extern char orig[];
|
||||
extern char opcommand[];
|
||||
extern int status;
|
||||
extern int showme;
|
||||
|
||||
|
||||
int create_bot(char *botname,char *botuser, char *bothost,char *botinfo)
|
||||
{
|
||||
sprintf(buf,"NICK %s 1 %ul %s %s %s :%s\n",botname,time(NULL)-86400,
|
||||
botuser,bothost,SERVERNAME,botinfo);
|
||||
writeln(sevsck,buf);
|
||||
}
|
||||
|
||||
int JoinChannel(char *botname,char *channel)
|
||||
{ sprintf(buf,":%s JOIN %s\n",botname,channel);
|
||||
writeln(sevsck,buf);
|
||||
sprintf(buf,"MODE %s +nto %s\n",channel,botname);
|
||||
writeln(sevsck,buf);
|
||||
}
|
||||
|
||||
int StartWastedump()
|
||||
{ create_bot(WASTE_BOTNAME,WASTE_BOTUSER,WASTE_BOTHOST,WASTE_BOTINFO);
|
||||
sprintf(buf,":%s MODE %s +kid\n",WASTE_BOTNAME,WASTE_BOTNAME);
|
||||
writeln(sevsck,buf);
|
||||
JoinChannel(WASTE_BOTNAME,WASTE_CHANNEL);
|
||||
|
||||
|
||||
}
|
||||
|
||||
int WriteWastedump(char *buffer)
|
||||
{
|
||||
writeln(sevsck,buffer);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int ParseWastedump()
|
||||
{
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user