]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - include/helperfuncs.h
Add WriteOpers_NoFormat, now to remember what I wanted it for
[user/henk/code/inspircd.git] / include / helperfuncs.h
1 /*       +------------------------------------+
2  *       | Inspire Internet Relay Chat Daemon |
3  *       +------------------------------------+
4  *
5  *  InspIRCd is copyright (C) 2002-2006 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 "typedefs.h"
26 #include <string>
27 #include <deque>
28 #include <sstream>
29
30 void log(int level,char *text, ...);
31 void readfile(file_cache &F, const char* fname);
32
33 void Write(int sock,char *text, ...);
34 void WriteServ(int sock, char* text, ...);
35 void WriteFrom(int sock, userrec *user,char* text, ...);
36 void WriteTo(userrec *source, userrec *dest,char *data, ...);
37 void WriteChannel(chanrec* Ptr, userrec* user, char* text, ...);
38 void WriteChannelLocal(chanrec* Ptr, userrec* user, char* text, ...);
39 void WriteChannelWithServ(char* ServName, chanrec* Ptr, char* text, ...);
40 void ChanExceptSender(chanrec* Ptr, userrec* user, char status, char* text, ...);
41 void WriteCommon(userrec *u, char* text, ...);
42 void WriteCommonExcept(userrec *u, char* text, ...);
43 void WriteOpers(const char* text, ...);
44
45 void Write_NoFormat(int sock,const char *text);
46 void WriteServ_NoFormat(int sock, const char* text);
47 void WriteFrom_NoFormat(int sock, userrec *user,const char* text);
48 void WriteTo_NoFormat(userrec *source, userrec *dest,const char *data);
49 void WriteChannel_NoFormat(chanrec* Ptr, userrec* user, const char* text);
50 void WriteChannelLocal_NoFormat(chanrec* Ptr, userrec* user, const char* text);
51 void WriteChannelWithServ_NoFormat(char* ServName, chanrec* Ptr, const char* text);
52 void ChanExceptSender_NoFormat(chanrec* Ptr, userrec* user, char status, const char* text);
53 void WriteCommon_NoFormat(userrec *u, const char* text);
54 void WriteCommonExcept_NoFormat(userrec *u, const char* text);
55 void WriteOpers_NoFormat(const char* text);
56
57 std::string GetServerDescription(char* servername);
58 void WriteMode(const char* modes, int flags, const char* text, ...);
59 void NoticeAll(userrec *source, bool local_only, char* text, ...);
60 void ServerNoticeAll(char* text, ...);
61 void ServerPrivmsgAll(char* text, ...);
62 void WriteWallOps(userrec *source, bool local_only, char* text, ...);
63 void strlower(char *n);
64 userrec* Find(const std::string &nick);
65 userrec* Find(const char* nick);
66 chanrec* FindChan(const char* chan);
67 long GetMaxBans(char* name);
68 void purge_empty_chans(userrec* u);
69 char* chanmodes(chanrec *chan, bool showkey);
70 void userlist(userrec *user,chanrec *c);
71 int usercount_i(chanrec *c);
72 int usercount(chanrec *c);
73 ConnectClass GetClass(userrec *user);
74 void send_error(char *s);
75 void Error(int status);
76 int usercnt(void);
77 int registered_usercount(void);
78 int usercount_invisible(void);
79 int usercount_opers(void);
80 int usercount_unknown(void);
81 long chancount(void);
82 long local_count();
83 void ShowMOTD(userrec *user);
84 void ShowRULES(userrec *user);
85 bool AllModulesReportReady(userrec* user);
86 bool DirValid(char* dirandfile);
87 std::string GetFullProgDir(char** argv, int argc);
88 int InsertMode(std::string &output, const char* modes, unsigned short section);
89 bool IsValidChannelName(const char *);
90
91 int charlcat(char* x,char y,int z);
92 bool charremove(char* mp, char remove);
93
94 #endif