]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - include/helperfuncs.h
Optimized helperfuncs
[user/henk/code/inspircd.git] / include / helperfuncs.h
1 /*       +------------------------------------+
2  *       | Inspire Internet Relay Chat Daemon |
3  *       +------------------------------------+
4  *
5  *  Inspire is copyright (C) 2002-2005 ChatSpike-Dev.
6  *                       E-mail:
7  *                <brain@chatspike.net>
8  *                <Craig@chatspike.net>
9  *
10  * Written by Craig Edwards, Craig McLure, and others.
11  * This program is free but copyrighted software; see
12  *            the file COPYING for details.
13  *
14  * ---------------------------------------------------
15  */
16
17 #ifndef _HELPER_H_
18 #define _HELPER_H_
19
20 #include "dynamic.h"
21 #include "base.h"
22 #include "ctables.h"
23 #include "users.h"
24 #include "channels.h"
25 #include <string>
26 #include <deque>
27 #include <sstream>
28
29 void log(int level,char *text, ...);
30 void readfile(file_cache &F, const char* fname);
31 void Write(int sock,char *text, ...);
32 void WriteServ(int sock, char* text, ...);
33 void WriteFrom(int sock, userrec *user,char* text, ...);
34 void WriteTo(userrec *source, userrec *dest,char *data, ...);
35 void WriteChannel(chanrec* Ptr, userrec* user, char* text, ...);
36 void WriteChannelLocal(chanrec* Ptr, userrec* user, char* text, ...);
37 void WriteChannelWithServ(char* ServName, chanrec* Ptr, char* text, ...);
38 void ChanExceptSender(chanrec* Ptr, userrec* user, char* text, ...);
39 std::string GetServerDescription(char* servername);
40 void WriteCommon(userrec *u, char* text, ...);
41 void WriteCommonExcept(userrec *u, char* text, ...);
42 void WriteOpers(char* text, ...);
43 void WriteMode(const char* modes, int flags, const char* text, ...);
44 void NoticeAll(userrec *source, bool local_only, char* text, ...);
45 void ServerNoticeAll(char* text, ...);
46 void ServerPrivmsgAll(char* text, ...);
47 void WriteWallOps(userrec *source, bool local_only, char* text, ...);
48 void strlower(char *n);
49 userrec* Find(std::string nick);
50 chanrec* FindChan(const char* chan);
51 long GetMaxBans(char* name);
52 void purge_empty_chans(userrec* u);
53 char* chanmodes(chanrec *chan);
54 void userlist(userrec *user,chanrec *c);
55 int usercount_i(chanrec *c);
56 int usercount(chanrec *c);
57 char* Passwd(userrec *user);
58 bool IsDenied(userrec *user);
59 void send_error(char *s);
60 void Error(int status);
61 int usercnt(void);
62 int registered_usercount(void);
63 int usercount_invisible(void);
64 int usercount_opers(void);
65 int usercount_unknown(void);
66 long chancount(void);
67 long local_count();
68 void ShowMOTD(userrec *user);
69 void ShowRULES(userrec *user);
70 bool AllModulesReportReady(userrec* user);
71 void createcommand(char* cmd, handlerfunc f, char flags, int minparams,char* source);
72 void SetupCommandTable(void);
73 bool DirValid(char* dirandfile);
74 std::string GetFullProgDir(char** argv, int argc);
75
76 #endif