]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - include/helperfuncs.h
Added notice-to-servermask
[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 NoticeAllOpers(userrec *source, bool local_only, char* text, ...);
44 bool ChanAnyOnThisServer(chanrec *c,char* servername);
45 bool CommonOnThisServer(userrec* u,const char* servername);
46 void WriteMode(const char* modes, int flags, const char* text, ...);
47 void NoticeAll(userrec *source, bool local_only, char* text, ...);
48 void ServerNoticeAll(char* text, ...);
49 void ServerPrivmsgAll(char* text, ...);
50 void WriteWallOps(userrec *source, bool local_only, char* text, ...);
51 void strlower(char *n);
52 userrec* Find(std::string nick);
53 chanrec* FindChan(const char* chan);
54 long GetMaxBans(char* name);
55 void purge_empty_chans(userrec* u);
56 char* chanmodes(chanrec *chan);
57 void userlist(userrec *user,chanrec *c);
58 int usercount_i(chanrec *c);
59 int usercount(chanrec *c);
60 char* Passwd(userrec *user);
61 bool IsDenied(userrec *user);
62 void send_error(char *s);
63 void Error(int status);
64 int usercnt(void);
65 int registered_usercount(void);
66 int usercount_invisible(void);
67 int usercount_opers(void);
68 int usercount_unknown(void);
69 long chancount(void);
70 long count_servs(void);
71 long servercount(void);
72 long local_count();
73 void ShowMOTD(userrec *user);
74 void ShowRULES(userrec *user);
75 bool AllModulesReportReady(userrec* user);
76 char islast(const char* s);
77 long map_count(const char* s);
78 void createcommand(char* cmd, handlerfunc f, char flags, int minparams,char* source);
79 void SetupCommandTable(void);
80 bool DirValid(char* dirandfile);
81 std::string GetFullProgDir(char** argv, int argc);
82
83 #endif