2004-05-16 14:58:40 +00:00
|
|
|
/* +------------------------------------+
|
|
|
|
* | Inspire Internet Relay Chat Daemon |
|
|
|
|
* +------------------------------------+
|
|
|
|
*
|
|
|
|
* Inspire is copyright (C) 2002-2004 ChatSpike-Dev.
|
|
|
|
* E-mail:
|
|
|
|
* <brain@chatspike.net>
|
|
|
|
* <Craig@chatspike.net>
|
|
|
|
*
|
|
|
|
* Written by Craig Edwards, Craig McLure, and others.
|
|
|
|
* This program is free but copyrighted software; see
|
|
|
|
* the file COPYING for details.
|
|
|
|
*
|
|
|
|
* ---------------------------------------------------
|
|
|
|
*/
|
2003-01-23 19:45:57 +00:00
|
|
|
|
|
|
|
#ifndef __WORLD_H
|
|
|
|
#define __WORLD_H
|
|
|
|
|
|
|
|
// include the common header files
|
|
|
|
|
|
|
|
#include <typeinfo>
|
2003-07-22 21:56:38 +00:00
|
|
|
#include <iostream>
|
2003-01-23 19:45:57 +00:00
|
|
|
#include <string>
|
|
|
|
#include <deque>
|
|
|
|
#include "users.h"
|
|
|
|
#include "channels.h"
|
|
|
|
|
2003-07-22 21:56:38 +00:00
|
|
|
typedef std::deque<std::string> file_cache;
|
2003-01-23 19:45:57 +00:00
|
|
|
|
|
|
|
void WriteOpers(char* text, ...);
|
2003-02-07 21:15:27 +00:00
|
|
|
void log(int level, char *text, ...);
|
2003-01-23 19:45:57 +00:00
|
|
|
void Write(int sock,char *text, ...);
|
|
|
|
void WriteServ(int sock, char* text, ...);
|
|
|
|
void WriteFrom(int sock, userrec *user,char* text, ...);
|
|
|
|
void WriteTo(userrec *source, userrec *dest,char *data, ...);
|
|
|
|
void WriteChannel(chanrec* Ptr, userrec* user, char* text, ...);
|
|
|
|
void ChanExceptSender(chanrec* Ptr, userrec* user, char* text, ...);
|
|
|
|
int common_channels(userrec *u, userrec *u2);
|
|
|
|
void WriteCommon(userrec *u, char* text, ...);
|
|
|
|
void WriteCommonExcept(userrec *u, char* text, ...);
|
2004-04-12 11:49:14 +00:00
|
|
|
void WriteWallOps(userrec *source, bool local_only, char* text, ...);
|
2003-01-23 19:45:57 +00:00
|
|
|
int isnick(const char *n);
|
2003-07-22 21:56:38 +00:00
|
|
|
userrec* Find(std::string nick);
|
2003-01-23 19:45:57 +00:00
|
|
|
chanrec* FindChan(const char* chan);
|
|
|
|
char* cmode(userrec *user, chanrec *chan);
|
2003-07-22 21:56:38 +00:00
|
|
|
std::string getservername();
|
|
|
|
std::string getnetworkname();
|
|
|
|
std::string getadminname();
|
|
|
|
std::string getadminemail();
|
|
|
|
std::string getadminnick();
|
2003-01-23 19:45:57 +00:00
|
|
|
void readfile(file_cache &F, const char* fname);
|
2003-07-22 21:56:38 +00:00
|
|
|
int ModeDefiend(char c, int i);
|
2003-01-23 19:45:57 +00:00
|
|
|
|
|
|
|
#endif
|