/*

oer - IRC bot

See ftp://nic.funet.fi/pub/unix/irc/docs/FAQ.gz section 11 for the
definition of the word bot.

Copyright (C) 2000-2001 EQU <equ@equnet.org>

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

*/

/* global prototype definitions */
extern char *getlamer(struct channel *);
extern char *safeban(struct channel *, char *, char *);
extern char *getfirsthostless(struct channel *, char *);
extern char *isnickbk(struct channel *, char *);
extern char *getkickreason(char *);
extern char *deltopic(struct channel *, int, char *);
extern int partcount(struct channel *, char *, char *);
extern int loadall(void);
extern int loadconf(void);
extern int loadchannels(void);
extern int loadtrusted(void);
extern int loadservices(void);
extern int loadadmins(void);
extern int loadkickreasons(void);
extern int loadchaninfo(void);
extern int saveall(void);
extern int saveconf(void);
extern int savechannels(void);
extern int savetrusted(void);
extern int saveservices(void);
extern int saveadmins(void);
extern int savekickreasons(void);
extern int savechaninfo(void);
extern int parseconf(char *);
extern int parsechannels(char *);
extern int parsetrusted(char *);
extern int parseservices(char *);
extern int parseadmins(char *);
extern int parsekickreasons(char *);
extern int parsechaninfo(char *);
extern int allhostsknown(struct channel *);
extern int burstjoins(struct channel *);
extern int isq(char *);
extern int isservice(char *);
extern int isme(char *);
extern int isop(struct channel *, char *);
extern int isvalidlogon(struct channel *, char *);
extern int isopa(char *);
extern int ishostless(char *);
extern int delopa(char *);
extern int isatleastopnow(struct channel *, char *, char *);
extern int isatleastop(struct channel *, char *, char *);
extern int isallowedop(struct channel *, char *);
extern int isadmin(struct channel *, char *);
extern int isonchan(struct channel *, char *);
extern int issameuser(struct channel *, char *, char *);
extern int isopnow(struct channel *, char *);
extern int nickchange(struct channel *, char *, char *);
extern int iswordbk(struct channel *, char *);
extern int isflood(struct channel *, char *, char *, char *);
extern int isvoicenow(struct channel *, char *);
extern int haschanflags(struct channel *, char*);
extern int hasadminflags(char *, char *);
extern int ispermban(struct channel *, char *);
extern int ismoderated(struct channel *);
extern int permbancount(struct channel *);
extern int topiccount(char *);
extern int nthmode(char *, int);
extern int userleft(struct channel *, char *, char *);
extern int changeuser(struct channel *, char *, int, int, int, int);
extern int whichctcp(char *);
extern int whichcommand(char *, int);
extern int gettobek(struct channel *, char *);
extern int checkforansi(struct channel *, char *, char *, char *);
extern int checkforflood(struct channel *, char *, char *, char *);
extern int checkforbadword(struct channel *, char *, char *, char *);
extern int checkforbadnick(struct channel *, char *, char *);
extern int checkforautorejoin(struct channel *, char *, char *);
extern int checkforpartrejoin(struct channel *, char *, char *);
extern int delchankey(struct channel *);
extern int delpermban(struct channel *, char *);
extern int delnickbk(struct channel *, char *);
extern int delwordbk(struct channel *, char *);
extern int uptime(time_t *, time_t *);
extern int deladmin(char *);
extern int deladminmask(char *, char *);
extern int deluser(struct channel *, char *);
extern int delusermask(struct channel *, char *, char *);
extern int deltrusted(char *);
extern int delservice(char *);
extern int delchannel(char *);
extern int delkickreason(char *);
extern int getondiskmsgcount(struct channel *, char *);
extern int getondiskjoincount(struct channel *, char *);
extern int getrandom(int);
extern int getrandommsg(struct channel *, char *, int, int, char *, int);
extern int getjoincount(struct channel *, char *);
extern int delserver(char *, int, int, int, int, int);
extern int deladverts(struct channel *, char *);
extern int setpassword(struct channel *, char *, char *);
extern int logoff(struct channel *, char *);
extern int logon(struct channel *, char *, char *, char *, int);
extern int timed_cmp(struct timed *, struct timed *);
extern int clonechannel(char *, char *);
extern int isfriend(struct channel *, char *, char *);
extern int deltachanflags(struct channel *, char *, char);
extern int isvalidchannel(char *);
extern struct authed *addnewauthed(struct channel *, time_t, struct botuser *, char *);
extern struct botuser *addbotuser(char *, char *);
extern struct botuser *addnewadmin(char *, char *);
extern struct botuser *addnewuser(struct channel *, char *, char *);
extern struct channel *addnewchannel(char *);
extern struct channel *getchptr(char *);
extern struct chanuser *userjoined(struct channel *, char *, char *, int, int, int, int);
extern struct chanuser *getcuptr(struct channel *, char *);
extern struct state *emptystate(void);
extern struct server *addnewserver(char *, int, int, int, int, int, char *);
extern struct server *getserver(void);
extern struct advert *addnewadvert(struct channel *, char *, char *);
extern struct maskstruct *addnewmask(char *);
extern struct maskstruct *addnewpermban(struct channel *, char *);
extern struct maskstruct *addnewnickbk(struct channel *, char *, char *);
extern struct maskstruct *addnewwordbk(struct channel *, char *);
extern struct maskstruct *addnewtrusted(char *);
extern struct maskstruct *addnewservice(char *);
extern struct maskstruct *addnewkickreason(char *);
extern struct maskstruct *addnewusermask(struct channel *, char *, char *);
extern struct maskstruct *addnewadminmask(char *, char *);
extern struct maskstruct *editmask(struct maskstruct *, char *, char *);
extern struct pubmsg *addnewpubmsg(struct channel *, time_t, char *, char *, char *);
extern struct part *addnewpart(struct channel *, time_t, char *, char *);
extern struct join *addnewjoin(struct channel *, time_t, char *, char *);
extern struct topic *addnewtopic(struct channel *, char *, char *);
extern struct topic *insertnewtopic(struct channel *, char *, char *, int);
extern struct topic *edittopic(struct channel *, char *, char *, int);
extern struct chanuser *getrandomuser(struct channel *);
extern struct ls_wrapstruct *addnew_ls(struct ls_wrapstruct *, int, time_t, char *, char *, char *);
extern struct timed *timed_new(struct channel *, time_t, int, int, char *);
extern struct mmode *mmode_new(struct channel *, time_t, char *, char *);
extern struct botuser *hasuserflags(struct channel *, char *, char *);
extern time_t lastoff(struct channel *, char *, char *);
extern void sendadverts(struct channel *, char *, char *);
extern void resetparts(struct channel *, char *, char *);
extern void initpubmsgs(struct channel *);
extern void freepubmsguser(char *, char *, char *);
extern void lockchan(struct channel *, char *, int, char *, char *);
extern void unlockchan(struct channel *, char *, char *);
extern void initchannel(struct channel *);
extern void initall(void);
extern void initnicks(struct channel *);
extern void initmmodes(struct channel *);
extern void initparts(struct channel *);
extern void initjoins(struct channel *);
extern void initnickbks(struct channel *);
extern void initwordbks(struct channel *);
extern void initpermbans(struct channel *);
extern void initusers(struct channel *);
extern void linenoise(void);
extern void checkstoned(void);
extern void delalltopics(struct channel *);
extern void swaptopic(struct channel *, int, int);
extern void gettopic(struct channel *, char *);
extern void listtopic(struct channel *, char *, int);
extern void setuserhost(char *, char *);
extern void sethostquerystatus(char *, int);
extern void banuser(struct channel *, char *);
extern void unbanuser(struct channel *, char *);
extern void kickuser(struct channel *, char *, char *);
extern void sendreply(char *, int, int, int, char *);
extern void sendchannelnotice(struct channel *, int, char *);
extern void addcommand(struct channel *, char *, int, char *, char *, char *);
extern void delcommand(struct channel *, char *, int, char *, char *, char *);
extern void editcommand(struct channel *, char *, int, char *, char *, char *);
extern void listcommand(struct channel *, char *, int, char *, char *, char *);
extern void logoffcommand(struct channel *, char *, int, char *, char *, char *);
extern void logoncommand(struct channel *, char *, int, char *, char *, char *);
extern void isjoined(struct channel *);
extern void changetobek(struct channel *, char *, int);
extern void setnick(void);
extern void setumode(void);
extern void syncvoices(struct channel *);
extern void syncops(struct channel *);
extern void syncbans(struct channel *);
extern void syncnickbks(struct channel *);
extern void syncuserhosts(char *);
extern void settopic(struct channel *);
extern void processenv(void);
extern void processnetjoin(struct channel *);
extern void mmodes2timeds(struct channel *);
extern void processlock(struct channel *);
extern void joinchannel(struct channel *);
extern void updatelast(struct channel *, char *, char *, char *);
extern void updateseen(struct channel *, char *, char *);
extern void showlast(struct channel *, char *, int, char *);
extern void showseen(struct channel *, char *, int, char *);
extern void setchanmode(struct channel *);
extern void setchankey(struct channel *, char *);
extern void channelsync(struct channel *);
extern void cleartobek(struct channel *);
extern void getnthmode(char *, int, char *);
extern void massmessage(char *, char *);
extern void flushall(void);
extern void quit(void);
extern void parsectcp(char *, char *, int, char *);
extern void nstats(struct channel *, char *, int, char *);
extern void wall(struct channel *, char *, char *, char *);
extern void cleanautheds(struct channel *);
extern void listchanusers(void);
extern void timed_del(struct timed *);
extern void mmode_del(struct channel *, struct mmode *);
