/*

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 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(char *);
extern char *getchanmode(char *);
extern char *getchankey(char *);
extern char *getchanflags(char *);
extern char *safeban(char *);
extern char *getfirsthostless(char *);
extern char *isnickbk(char *, char *);
extern char *getkickreason(char *);
extern char *deltopic(char *, int, char *);
extern int partcount(char *, char *, char *);
extern int loadall(void);
extern int loadconf(void);
extern int loadchannels(void);
extern int loadtrusted(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 saveadmins(void);
extern int savekickreasons(void);
extern int savechaninfo(void);
extern int parseconf(char *);
extern int parsechannels(char *);
extern int parsetrusted(char *);
extern int parseadmins(char *);
extern int parsekickreasons(char *);
extern int parsechaninfo(char *);
extern int allhostsknown(char *);
extern int burstjoins(char *);
extern int isq(char *);
extern int isme(char *);
extern int amiop(char *);
extern int isop(char *, char *);
extern int isvalidlogon(char *, char *);
extern int isopa(char *);
extern int ishostless(char *);
extern int delopa(char *);
extern int isatleastopnow(char *, char *, char *);
extern int isallowedop(char *, char *);
extern int isadmin(char *, char *);
extern int isonchan(char *, char *);
extern int issameuser(char *, char *, char *);
extern int isopnow(char *, char *);
extern int nickchange(char *, char *, char *);
extern int iswordbk(char *, char *);
extern int isflood(char *, char *, char *, char *);
extern int isvalidchannel(char *);
extern int isvoicenow(char *, char *);
extern int usersonchan(char *);
extern int haschanflags(char *, char*);
extern int hasadminflags(char *, char *);
extern int hasuserflags(char *, char *, char *);
extern int ispermban(char *, char *);
extern int ismoderated(char *);
extern int permbancount(char *);
extern int topiccount(char *);
extern int nthmode(char *, int);
extern int userleft(char *, char *, char *);
extern int sameuser(char *, char *, char *, char *);
extern int changeuser(char *, char *, int, int, int);
extern int whichctcp(char *);
extern int whichcommand(char *, int);
extern int gettobek(char *, char *);
extern int checkforansi(char *, char *, char *, char *);
extern int checkforflood(char *, char *, char *, char *);
extern int checkforbadword(char *, char *, char *, char *);
extern int checkforbadnick(char *, char *, char *);
extern int checkforautorejoin(char *, char *, char *);
extern int checkforpartrejoin(char *, char *, char *);
extern int delchankey(char *);
extern int delpermban(char *, char *);
extern int delnickbk(char *, char *);
extern int delwordbk(char *, char *);
extern int uptime(time_t *, time_t *);
extern int deladmin(char *);
extern int deladminmask(char *, char *);
extern int deluser(char *, char *);
extern int delusermask(char *, char *, char *);
extern int deltrusted(char *);
extern int delchannel(char *);
extern int delkickreason(char *);
extern int getondiskmsgcount(char *, char *);
extern int getondiskjoincount(char *, char *);
extern int getrandom(int);
extern int getrandommsg(char *, char *, int, int, char *, int);
extern int getjoincount(char *, char *);
extern int lastquote(char *);
extern int delserver(char *, int, int, int, int, int);
extern int setpassword(char *, char *, char *);
extern int logoff(char *, char *);
extern int logon(char *, char *, char *, char *, int);
extern struct authed *addnewauthed(char *, time_t, struct botuser *, char *);
extern struct botuser *addbotuser(char *, char *);
extern struct botuser *addnewadmin(char *, char *);
extern struct botuser *addnewuser(char *, char *, char *);
extern struct channel *addnewchannel(char *);
extern struct channel *getchptr(char *);
extern struct chanuser *userjoined(char *, char *, char *, int, int, int);
extern struct chanuser *getcuptr(char *, char *);
extern struct state *emptystate(void);
extern struct server *addnewserver(char *, int, int, int, int, int);
extern struct server *getserver(void);
extern struct advert *addnewadvert(char *, char *, char *);
extern struct maskstruct *addnewmask(char *);
extern struct maskstruct *addnewpermban(char *, char *);
extern struct maskstruct *addnewnickbk(char *, char *, char *);
extern struct maskstruct *addnewwordbk(char *, char *);
extern struct maskstruct *addnewtrusted(char *);
extern struct maskstruct *addnewkickreason(char *);
extern struct maskstruct *addnewusermask(char *, char *, char *);
extern struct maskstruct *addnewadminmask(char *, char *);
extern struct maskstruct *editmask(struct maskstruct *, char *, char *);
extern struct modeline *addnewmm(char *, time_t, char *, char *);
extern struct pubmsg *addnewpubmsg(char *, time_t, char *, char *, char *);
extern struct part *addnewpart(char *, time_t, char *, char *);
extern struct join *addnewjoin(char *, time_t, char *, char *);
extern struct timed *addnewtimed(time_t, int, int, char *, char *, char *, char *);
extern struct topic *addnewtopic(char *, char *, char *);
extern struct topic *insertnewtopic(char *, char *, char *, int);
extern struct topic *edittopic(char *, char *, char *, int);
extern struct chanuser *getrandomuser(char *);
extern struct ls_wrapstruct *addnew_ls(struct ls_wrapstruct *, time_t, char *, char *, char *);
extern time_t lastoff(char *, char *);
extern void sendadverts(char *, char *, char *);
extern void deladverts(char *, char *);
extern void resetparts(char *, char *, char *);
extern void iamop(char *, int);
extern void initpubmsgs(char *);
extern void freepubmsguser(char *, char *, char *);
extern void lockchan(char *, char *, int, char *, char *);
extern void unlockchan(char *, char *, char *);
extern void clearflood(char *, char *, char *);
extern void newchannel(char *);
extern void initchannel(char *);
extern void initall(void);
extern void inittimeds(void);
extern void initmmodes(char *);
extern void initnicks(char *);
extern void initpubmsgs(char *);
extern void initparts(char *);
extern void initjoins(char *);
extern void initnickbks(char *);
extern void initwordbks(char *);
extern void initpermbans(char *);
extern void initusers(char *);
extern void linenoise(void);
extern void checkstoned(void);
extern void delalltopics(char *);
extern void refreshtopic(char *);
extern void swaptopic(char *, int, int);
extern void gettopic(char *, char *);
extern void listtopic(char *, int, char *);
extern void setuserhost(char *, char *);
extern void sethostquerystatus(char *, int);
extern void iwaskicked(char *);
extern void banuser(char *, char *);
extern void unbanuser(char *, char *);
extern void bankickuser(char *, char *, char *);
extern void kickuser(char *, char *, char *);
extern void sendreply(char *, int, int, int, char *);
extern void sendchannelnotice(char *, int, char *);
extern void addcommand(char *, int, char *, char *, char *, char *);
extern void delcommand(char *, int, char *, char *, char *, char *);
extern void editcommand(char *, int, char *, char *, char *, char *);
extern void listcommand(char *, int, char *, char *, char *, char *);
extern void logoffcommand(char *, int, char *, char *, char *, char *);
extern void logoncommand(char *, int, char *, char *, char *, char *);
extern void isjoined(char *);
extern void changetobek(char *, char *, int);
extern void setnick(void);
extern void setumode(void);
extern void syncvoices(char *);
extern void syncops(char *);
extern void syncbans(char *);
extern void syncnickbks(char *);
extern void syncuserhosts(void);
extern void settopic(void);
extern void processenv(void);
extern void processlock(void);
extern void joinchannels(void);
extern void updatelast(char *, char *, char *, char *);
extern void updateseen(char *, char *, char *);
extern void showlast(char *, int, char *, char *);
extern void showseen(char *, int, char *, char *);
extern void setchanflags(char *, char *);
extern void setchanmode(char *, char *);
extern void setchankey(char *, char *);
extern void channelsync(char *);
extern void cleartobek(char *);
extern void getnthmode(char *, int, char *);
extern void massmessage(char *, char *);
extern void setlastquote(char *, time_t);
extern void flushall(void);
extern void quit(void);
extern void parsectcp(char *, char *, int, char *);
extern void nstats(char *, int, char *, char *);
extern void wall(char *, char *, char *, char *);
extern void cleanautheds(char *);
