1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * Inspire is copyright (C) 2002-2004 ChatSpike-Dev.
7 * <brain@chatspike.net>
8 * <Craig@chatspike.net>
10 * Written by Craig Edwards, Craig McLure, and others.
11 * This program is free but copyrighted software; see
12 * the file COPYING for details.
14 * ---------------------------------------------------
19 #include "inspircd_config.h"
21 #include "inspircd_io.h"
22 #include "inspircd_util.h"
24 #include <sys/errno.h>
27 #include <sys/types.h>
28 #include <sys/event.h>
33 #include <sys/epoll.h>
39 #include <ext/hash_map>
47 #include "connection.h"
59 #include "inspstring.h"
60 #include "helperfuncs.h"
73 extern std::vector<Module*> modules;
74 extern std::vector<ircd_module*> factory;
76 extern std::vector<std::string> include_stack;
78 extern std::vector<InspSocket*> module_sockets;
83 extern char ServerName[MAXBUF];
84 extern char Network[MAXBUF];
85 extern char ServerDesc[MAXBUF];
86 extern char AdminName[MAXBUF];
87 extern char AdminEmail[MAXBUF];
88 extern char AdminNick[MAXBUF];
89 extern char diepass[MAXBUF];
90 extern char restartpass[MAXBUF];
91 extern char motd[MAXBUF];
92 extern char rules[MAXBUF];
93 extern char list[MAXBUF];
94 extern char PrefixQuit[MAXBUF];
95 extern char DieValue[MAXBUF];
98 extern int WHOWAS_STALE;
99 extern int WHOWAS_MAX;
101 extern time_t startup_time;
102 extern int NetBufferSize;
103 extern int MaxWhoResults;
104 extern time_t nb_start;
106 extern std::vector<std::string> module_names;
108 extern int boundPortCount;
109 extern int portCount;
110 extern int SERVERportCount;
111 extern int ports[MAXSOCKS];
112 extern int defaultRoute;
114 extern std::vector<long> auth_cookies;
115 extern std::stringstream config_f;
117 extern serverrec* me[32];
119 extern FILE *log_file;
121 extern userrec* fd_ref_table[65536];
123 typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp> user_hash;
124 typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, irc::StrHashComp> chan_hash;
125 typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, irc::InAddr_HashComp> address_cache;
126 typedef nspace::hash_map<std::string, WhoWasUser*, nspace::hash<string>, irc::StrHashComp> whowas_hash;
127 typedef std::deque<command_t> command_table;
130 extern user_hash clientlist;
131 extern chan_hash chanlist;
132 extern whowas_hash whowas;
133 extern command_table cmdlist;
134 extern file_cache MOTD;
135 extern file_cache RULES;
136 extern address_cache IP;
139 // class type for holding an extended mode character - internal to core
141 class ExtMode : public classbase
150 ExtMode(char mc, int ty, bool oper, int p_on, int p_off) : modechar(mc), type(ty), needsoper(oper), params_when_on(p_on), params_when_off(p_off) { };
153 typedef std::vector<ExtMode> ExtModeList;
154 typedef ExtModeList::iterator ExtModeListIter;
159 // returns true if an extended mode character is in use
160 bool ModeDefined(char modechar, int type)
162 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
164 if ((i->modechar == modechar) && (i->type == type))
172 bool ModeIsListMode(char modechar, int type)
174 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
176 if ((i->modechar == modechar) && (i->type == type) && (i->list == true))
184 bool ModeDefinedOper(char modechar, int type)
186 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
188 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true))
196 // returns number of parameters for a custom mode when it is switched on
197 int ModeDefinedOn(char modechar, int type)
199 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
201 if ((i->modechar == modechar) && (i->type == type))
203 return i->params_when_on;
209 // returns number of parameters for a custom mode when it is switched on
210 int ModeDefinedOff(char modechar, int type)
212 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
214 if ((i->modechar == modechar) && (i->type == type))
216 return i->params_when_off;
222 // returns true if an extended mode character is in use
223 bool DoAddExtendedMode(char modechar, int type, bool requires_oper, int params_on, int params_off)
225 if (ModeDefined(modechar,type)) {
228 EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off));
232 // turns a mode into a listmode
233 void ModeMakeList(char modechar)
235 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
237 if ((i->modechar == modechar) && (i->type == MT_CHANNEL))
246 // version is a simple class for holding a modules version number
248 Version::Version(int major, int minor, int revision, int build, int flags) : Major(major), Minor(minor), Revision(revision), Build(build), Flags(flags) { };
250 // admin is a simple class for holding a server's administrative info
252 Admin::Admin(std::string name, std::string email, std::string nick) : Name(name), Email(email), Nick(nick) { };
254 Request::Request(char* anydata, Module* src, Module* dst) : data(anydata), source(src), dest(dst) { };
256 char* Request::GetData()
261 Module* Request::GetSource()
266 Module* Request::GetDest()
271 char* Request::Send()
275 return dest->OnRequest(this);
283 Event::Event(char* anydata, Module* src, std::string eventid) : data(anydata), source(src), id(eventid) { };
285 char* Event::GetData()
290 Module* Event::GetSource()
297 FOREACH_MOD OnEvent(this);
301 std::string Event::GetEventID()
307 // These declarations define the behavours of the base class Module (which does nothing at all)
309 Module::~Module() { }
310 void Module::OnUserConnect(userrec* user) { }
311 void Module::OnUserQuit(userrec* user) { }
312 void Module::OnUserDisconnect(userrec* user) { }
313 void Module::OnUserJoin(userrec* user, chanrec* channel) { }
314 void Module::OnUserPart(userrec* user, chanrec* channel) { }
315 void Module::OnPacketTransmit(std::string &data, std::string serv) { }
316 void Module::OnPacketReceive(std::string &data, std::string serv) { }
317 void Module::OnRehash() { }
318 void Module::OnServerRaw(std::string &raw, bool inbound, userrec* user) { }
319 int Module::OnUserPreJoin(userrec* user, chanrec* chan, const char* cname) { return 0; }
320 int Module::OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list ¶ms) { return false; }
321 Version Module::GetVersion() { return Version(1,0,0,0,VF_VENDOR); }
322 void Module::OnOper(userrec* user) { };
323 void Module::OnInfo(userrec* user) { };
324 void Module::OnWhois(userrec* source, userrec* dest) { };
325 int Module::OnUserPreInvite(userrec* source,userrec* dest,chanrec* channel) { return 0; };
326 int Module::OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text) { return 0; };
327 int Module::OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text) { return 0; };
328 int Module::OnUserPreNick(userrec* user, std::string newnick) { return 0; };
329 void Module::OnUserPostNick(userrec* user, std::string oldnick) { };
330 int Module::OnAccessCheck(userrec* source,userrec* dest,chanrec* channel,int access_type) { return ACR_DEFAULT; };
331 string_list Module::OnUserSync(userrec* user) { string_list empty; return empty; }
332 string_list Module::OnChannelSync(chanrec* chan) { string_list empty; return empty; }
333 void Module::On005Numeric(std::string &output) { };
334 int Module::OnKill(userrec* source, userrec* dest, std::string reason) { return 0; };
335 void Module::OnLoadModule(Module* mod,std::string name) { };
336 void Module::OnUnloadModule(Module* mod,std::string name) { };
337 void Module::OnBackgroundTimer(time_t curtime) { };
338 void Module::OnSendList(userrec* user, chanrec* channel, char mode) { };
339 int Module::OnPreCommand(std::string command, char **parameters, int pcnt, userrec *user) { return 0; };
340 bool Module::OnCheckReady(userrec* user) { return true; };
341 void Module::OnUserRegister(userrec* user) { };
342 int Module::OnUserPreKick(userrec* source, userrec* user, chanrec* chan, std::string reason) { return 0; };
343 void Module::OnUserKick(userrec* source, userrec* user, chanrec* chan, std::string reason) { };
344 int Module::OnRawMode(userrec* user, chanrec* chan, char mode, std::string param, bool adding, int pcnt) { return 0; };
345 int Module::OnCheckInvite(userrec* user, chanrec* chan) { return 0; };
346 int Module::OnCheckKey(userrec* user, chanrec* chan, std::string keygiven) { return 0; };
347 int Module::OnCheckLimit(userrec* user, chanrec* chan) { return 0; };
348 int Module::OnCheckBan(userrec* user, chanrec* chan) { return 0; };
349 void Module::OnStats(char symbol) { };
350 int Module::OnChangeLocalUserHost(userrec* user, std::string newhost) { return 0; };
351 int Module::OnChangeLocalUserGECOS(userrec* user, std::string newhost) { return 0; };
352 int Module::OnLocalTopicChange(userrec* user, chanrec* chan, std::string topic) { return 0; };
353 int Module::OnMeshToken(char token,string_list params,serverrec* source,serverrec* reply, std::string tcp_host,std::string ipaddr,int port) { return 0; };
354 void Module::OnEvent(Event* event) { return; };
355 char* Module::OnRequest(Request* request) { return NULL; };
356 int Module::OnOperCompare(std::string password, std::string input) { return 0; };
357 void Module::OnGlobalOper(userrec* user) { };
358 void Module::OnGlobalConnect(userrec* user) { };
359 int Module::OnAddBan(userrec* source, chanrec* channel,std::string banmask) { return 0; };
360 int Module::OnDelBan(userrec* source, chanrec* channel,std::string banmask) { return 0; };
361 void Module::OnRawSocketAccept(int fd, std::string ip, int localport) { };
362 int Module::OnRawSocketWrite(int fd, char* buffer, int count) { return 0; };
363 void Module::OnRawSocketClose(int fd) { };
364 int Module::OnRawSocketRead(int fd, char* buffer, unsigned int count, int &readresult) { return 0; };
366 // server is a wrapper class that provides methods to all of the C-style
367 // exports in the core
378 void Server::SendOpers(std::string s)
380 WriteOpers("%s",s.c_str());
383 bool Server::MatchText(std::string sliteral, std::string spattern)
385 char literal[MAXBUF],pattern[MAXBUF];
386 strlcpy(literal,sliteral.c_str(),MAXBUF);
387 strlcpy(pattern,spattern.c_str(),MAXBUF);
388 return match(literal,pattern);
391 void Server::SendToModeMask(std::string modes, int flags, std::string text)
393 WriteMode(modes.c_str(),flags,"%s",text.c_str());
396 chanrec* Server::JoinUserToChannel(userrec* user, std::string cname, std::string key)
398 return add_channel(user,cname.c_str(),key.c_str(),false);
401 chanrec* Server::PartUserFromChannel(userrec* user, std::string cname, std::string reason)
403 return del_channel(user,cname.c_str(),reason.c_str(),false);
406 chanuserlist Server::GetUsers(chanrec* chan)
410 std::vector<char*> *list = chan->GetUsers();
411 for (std::vector<char*>::iterator i = list->begin(); i != list->end(); i++)
414 userl.push_back((userrec*)o);
418 void Server::ChangeUserNick(userrec* user, std::string nickname)
420 force_nickchange(user,nickname.c_str());
423 void Server::QuitUser(userrec* user, std::string reason)
425 kill_link(user,reason.c_str());
428 bool Server::IsUlined(std::string server)
430 return is_uline(server.c_str());
433 void Server::CallCommandHandler(std::string commandname, char** parameters, int pcnt, userrec* user)
435 call_handler(commandname.c_str(),parameters,pcnt,user);
438 void Server::Log(int level, std::string s)
440 log(level,"%s",s.c_str());
443 void Server::AddCommand(char* cmd, handlerfunc f, char flags, int minparams, char* source)
445 createcommand(cmd,f,flags,minparams,source);
448 void Server::SendMode(char **parameters, int pcnt, userrec *user)
450 server_mode(parameters,pcnt,user);
453 void Server::Send(int Socket, std::string s)
455 Write(Socket,"%s",s.c_str());
458 void Server::SendServ(int Socket, std::string s)
460 WriteServ(Socket,"%s",s.c_str());
463 void Server::SendFrom(int Socket, userrec* User, std::string s)
465 WriteFrom(Socket,User,"%s",s.c_str());
468 void Server::SendTo(userrec* Source, userrec* Dest, std::string s)
472 // if source is NULL, then the message originates from the local server
473 Write(Dest->fd,":%s %s",this->GetServerName().c_str(),s.c_str());
477 // otherwise it comes from the user specified
478 WriteTo(Source,Dest,"%s",s.c_str());
482 void Server::SendChannelServerNotice(std::string ServName, chanrec* Channel, std::string text)
484 WriteChannelWithServ((char*)ServName.c_str(), Channel, "%s", text.c_str());
487 void Server::SendChannel(userrec* User, chanrec* Channel, std::string s,bool IncludeSender)
491 WriteChannel(Channel,User,"%s",s.c_str());
495 ChanExceptSender(Channel,User,"%s",s.c_str());
499 bool Server::CommonChannels(userrec* u1, userrec* u2)
501 return (common_channels(u1,u2) != 0);
504 void Server::SendCommon(userrec* User, std::string text,bool IncludeSender)
508 WriteCommon(User,"%s",text.c_str());
512 WriteCommonExcept(User,"%s",text.c_str());
516 void Server::SendWallops(userrec* User, std::string text)
518 WriteWallOps(User,false,"%s",text.c_str());
521 void Server::ChangeHost(userrec* user, std::string host)
523 ChangeDisplayedHost(user,host.c_str());
526 void Server::ChangeGECOS(userrec* user, std::string gecos)
528 ChangeName(user,gecos.c_str());
531 bool Server::IsNick(std::string nick)
533 return (isnick(nick.c_str()) != 0);
536 userrec* Server::FindNick(std::string nick)
541 userrec* Server::FindDescriptor(int socket)
543 return (socket < 65536 ? fd_ref_table[socket] : NULL);
546 chanrec* Server::FindChannel(std::string channel)
548 return FindChan(channel.c_str());
551 std::string Server::ChanMode(userrec* User, chanrec* Chan)
553 return cmode(User,Chan);
556 bool Server::IsOnChannel(userrec* User, chanrec* Chan)
558 return has_channel(User,Chan);
561 std::string Server::GetServerName()
563 return getservername();
566 std::string Server::GetNetworkName()
568 return getnetworkname();
571 std::string Server::GetServerDescription()
573 return getserverdesc();
576 Admin Server::GetAdmin()
578 return Admin(getadminname(),getadminemail(),getadminnick());
583 bool Server::AddExtendedMode(char modechar, int type, bool requires_oper, int params_when_on, int params_when_off)
585 if (((modechar >= 'A') && (modechar <= 'Z')) || ((modechar >= 'a') && (modechar <= 'z')))
587 if (type == MT_SERVER)
589 log(DEBUG,"*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion");
592 if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT))
594 log(DEBUG,"*** API ERROR *** Parameters on MT_CLIENT modes are not supported");
597 if ((params_when_on>1) || (params_when_off>1))
599 log(DEBUG,"*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported");
602 return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off);
606 log(DEBUG,"*** API ERROR *** Muppet modechar detected.");
611 bool Server::AddExtendedListMode(char modechar)
613 bool res = DoAddExtendedMode(modechar,MT_CHANNEL,false,1,1);
615 ModeMakeList(modechar);
619 int Server::CountUsers(chanrec* c)
625 bool Server::UserToPseudo(userrec* user,std::string message)
627 unsigned int old_fd = user->fd;
628 user->fd = FD_MAGIC_NUMBER;
630 Write(old_fd,"ERROR :Closing link (%s@%s) [%s]",user->ident,user->host,message.c_str());
633 EV_SET(&ke, old_fd, EVFILT_READ, EV_DELETE, 0, 0, NULL);
634 int i = kevent(kq, &ke, 1, 0, 0, NULL);
637 log(DEBUG,"kqueue: Failed to remove user from queue!");
641 struct epoll_event ev;
642 ev.events = EPOLLIN | EPOLLET;
644 int i = epoll_ctl(ep, EPOLL_CTL_DEL, old_fd, &ev);
647 log(DEBUG,"epoll: List deletion failure!");
656 bool Server::PseudoToUser(userrec* alive,userrec* zombie,std::string message)
658 zombie->fd = alive->fd;
659 alive->fd = FD_MAGIC_NUMBER;
660 alive->ClearBuffer();
661 Write(zombie->fd,":%s!%s@%s NICK %s",alive->nick,alive->ident,alive->host,zombie->nick);
662 kill_link(alive,message.c_str());
663 fd_ref_table[zombie->fd] = zombie;
664 for (int i = 0; i != MAXCHANS; i++)
666 if (zombie->chans[i].channel != NULL)
668 if (zombie->chans[i].channel->name)
670 chanrec* Ptr = zombie->chans[i].channel;
671 WriteFrom(zombie->fd,zombie,"JOIN %s",Ptr->name);
674 WriteServ(zombie->fd,"332 %s %s :%s", zombie->nick, Ptr->name, Ptr->topic);
675 WriteServ(zombie->fd,"333 %s %s %s %d", zombie->nick, Ptr->name, Ptr->setby, Ptr->topicset);
677 userlist(zombie,Ptr);
678 WriteServ(zombie->fd,"366 %s %s :End of /NAMES list.", zombie->nick, Ptr->name);
686 void Server::AddGLine(long duration, std::string source, std::string reason, std::string hostmask)
688 add_gline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
691 void Server::AddQLine(long duration, std::string source, std::string reason, std::string nickname)
693 add_qline(duration, source.c_str(), reason.c_str(), nickname.c_str());
696 void Server::AddZLine(long duration, std::string source, std::string reason, std::string ipaddr)
698 add_zline(duration, source.c_str(), reason.c_str(), ipaddr.c_str());
701 void Server::AddKLine(long duration, std::string source, std::string reason, std::string hostmask)
703 add_kline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
706 void Server::AddELine(long duration, std::string source, std::string reason, std::string hostmask)
708 add_eline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
711 bool Server::DelGLine(std::string hostmask)
713 return del_gline(hostmask.c_str());
716 bool Server::DelQLine(std::string nickname)
718 return del_qline(nickname.c_str());
721 bool Server::DelZLine(std::string ipaddr)
723 return del_zline(ipaddr.c_str());
726 bool Server::DelKLine(std::string hostmask)
728 return del_kline(hostmask.c_str());
731 bool Server::DelELine(std::string hostmask)
733 return del_eline(hostmask.c_str());
736 long Server::CalcDuration(std::string delta)
738 return duration(delta.c_str());
741 bool Server::IsValidMask(std::string mask)
743 const char* dest = mask.c_str();
744 if (strchr(dest,'!')==0)
746 if (strchr(dest,'@')==0)
748 for (unsigned int i = 0; i < strlen(dest); i++)
751 for (unsigned int i = 0; i < strlen(dest); i++)
755 for (unsigned int i = 0; i < strlen(dest); i++)
761 for (unsigned int i = 0; i < strlen(dest); i++)
770 void Server::MeshSendAll(std::string text)
772 NetSendToAll((char*)text.c_str());
775 void Server::MeshSendCommon(userrec* user, std::string text)
778 NetSendToCommon(user,(char*)text.c_str());
781 void Server::MeshSendAllAlive(std::string text)
783 NetSendToAllAlive((char*)text.c_str());
786 void Server::MeshSendUnicast(std::string destination, std::string text)
788 NetSendToOne((char*)destination.c_str(),(char*)text.c_str());
791 void Server::MeshSendAllExcept(std::string target, std::string text)
793 NetSendToAllExcept(target.c_str(),(char*)text.c_str());
796 bool Server::MeshCheckChan(chanrec *c,std::string servername)
800 return ChanAnyOnThisServer(c,(char*)servername.c_str());
805 bool Server::MeshCheckCommon(userrec* u,std::string servername)
809 return CommonOnThisServer(u,(char*)servername.c_str());
814 Module* Server::FindModule(std::string name)
816 for (int i = 0; i <= MODCOUNT; i++)
818 if (module_names[i] == name)
826 ConfigReader::ConfigReader()
828 include_stack.clear();
829 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);
830 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out);
831 this->readerror = LoadConf(CONFIG_FILE,this->cache,this->errorlog);
832 if (!this->readerror)
833 this->error = CONF_FILE_NOT_FOUND;
837 ConfigReader::~ConfigReader()
842 delete this->errorlog;
846 ConfigReader::ConfigReader(std::string filename)
848 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);
849 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out);
850 this->readerror = LoadConf(filename.c_str(),this->cache,this->errorlog);
851 if (!this->readerror)
852 this->error = CONF_FILE_NOT_FOUND;
855 std::string ConfigReader::ReadValue(std::string tag, std::string name, int index)
860 strlcpy(t,tag.c_str(),MAXBUF);
861 strlcpy(n,name.c_str(),MAXBUF);
862 int res = ReadConf(cache,t,n,index,val);
865 this->error = CONF_VALUE_NOT_FOUND;
871 bool ConfigReader::ReadFlag(std::string tag, std::string name, int index)
876 strlcpy(t,tag.c_str(),MAXBUF);
877 strlcpy(n,name.c_str(),MAXBUF);
878 int res = ReadConf(cache,t,n,index,val);
881 this->error = CONF_VALUE_NOT_FOUND;
885 return ((s == "yes") || (s == "YES") || (s == "true") || (s == "TRUE") || (s == "1"));
888 long ConfigReader::ReadInteger(std::string tag, std::string name, int index, bool needs_unsigned)
893 strlcpy(t,tag.c_str(),MAXBUF);
894 strlcpy(n,name.c_str(),MAXBUF);
895 int res = ReadConf(cache,t,n,index,val);
898 this->error = CONF_VALUE_NOT_FOUND;
901 for (unsigned int i = 0; i < strlen(val); i++)
903 if (!isdigit(val[i]))
905 this->error = CONF_NOT_A_NUMBER;
909 if ((needs_unsigned) && (atoi(val)<0))
911 this->error = CONF_NOT_UNSIGNED;
917 long ConfigReader::GetError()
919 long olderr = this->error;
924 void ConfigReader::DumpErrors(bool bail, userrec* user)
928 printf("There were errors in your configuration:\n%s",errorlog->str().c_str());
936 WriteServ(user->fd,"NOTICE %s :There were errors in the configuration file:",user->nick);
937 while (!errorlog->eof())
939 errorlog->getline(dataline,1024);
940 WriteServ(user->fd,"NOTICE %s :%s",user->nick,dataline);
945 WriteOpers("There were errors in the configuration file:",user->nick);
946 while (!errorlog->eof())
948 errorlog->getline(dataline,1024);
949 WriteOpers(dataline);
957 int ConfigReader::Enumerate(std::string tag)
959 return EnumConf(cache,tag.c_str());
962 int ConfigReader::EnumerateValues(std::string tag, int index)
964 return EnumValues(cache, tag.c_str(), index);
967 bool ConfigReader::Verify()
969 return this->readerror;
973 FileReader::FileReader(std::string filename)
976 readfile(c,filename.c_str());
980 FileReader::FileReader()
984 void FileReader::LoadFile(std::string filename)
987 readfile(c,filename.c_str());
992 FileReader::~FileReader()
996 bool FileReader::Exists()
1008 std::string FileReader::GetLine(int x)
1010 if ((x<0) || ((unsigned)x>fc.size()))
1015 int FileReader::FileSize()
1021 std::vector<Module*> modules(255);
1022 std::vector<ircd_module*> factory(255);