From 0c55e6d24b32f2cc4e2b8106f2f4032e3197c211 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 15 Dec 2005 13:44:17 +0000 Subject: Moved a ton of user related functions from inspircd.cpp to users.cpp git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2468 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/commands.h | 1 + include/inspircd.h | 9 --------- include/users.h | 17 +++++++++++++---- 3 files changed, 14 insertions(+), 13 deletions(-) (limited to 'include') diff --git a/include/commands.h b/include/commands.h index 6690d16c0..f05e9dac0 100644 --- a/include/commands.h +++ b/include/commands.h @@ -82,6 +82,7 @@ void handle_server(char **parameters, int pcnt, userrec *user); void handle_loadmodule(char **parameters, int pcnt, userrec *user); void handle_unloadmodule(char **parameters, int pcnt, userrec *user); void handle_commands(char **parameters, int pcnt, userrec *user); +void handle_version(char **parameters, int pcnt, userrec *user); /** Functions for u:lined servers */ diff --git a/include/inspircd.h b/include/inspircd.h index e9d3b10ed..fa8f1e886 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -115,23 +115,14 @@ class InspIRCd /* prototypes */ void force_nickchange(userrec* user,const char* newnick); -void kill_link(userrec *user,const char* r); -void kill_link_silent(userrec *user,const char* r); void call_handler(const char* commandname,char **parameters, int pcnt, userrec *user); bool is_valid_cmd(const char* commandname, int pcnt, userrec * user); int loop_call(handlerfunc fn, char **parameters, int pcnt, userrec *u, int start, int end, int joins); -void AddWhoWas(userrec* u); -void ConnectUser(userrec *user); userrec* ReHashNick(char* Old, char* New); -/* optimization tricks to save us walking the user hash */ -void AddOper(userrec* user); -void DeleteOper(userrec* user); -void handle_version(char **parameters, int pcnt, userrec *user); /* userrec optimization stuff */ void AddServerName(std::string servername); const char* FindServerNamePtr(std::string servername); void* dns_task(void* arg); void process_buffer(const char* cmdbuf,userrec *user); -void FullConnectUser(userrec* user); #endif diff --git a/include/users.h b/include/users.h index dbe1215ea..6e5aba1a2 100644 --- a/include/users.h +++ b/include/users.h @@ -236,23 +236,23 @@ class userrec : public connection /** Returns true if a user is invited to a channel. */ - virtual bool IsInvited(char* channel); + virtual bool IsInvited(irc::string &channel); /** Adds a channel to a users invite list (invites them to a channel) */ - virtual void InviteTo(char* channel); + virtual void InviteTo(irc::string &channel); /** Removes a channel from a users invite list. * This member function is called on successfully joining an invite only channel * to which the user has previously been invited, to clear the invitation. */ - virtual void RemoveInvite(char* channel); + virtual void RemoveInvite(irc::string &channel); /** Returns true or false for if a user can execute a privilaged oper command. * This is done by looking up their oper type from userrec::oper, then referencing * this to their oper classes and checking the commands they can execute. */ - bool HasPermission(char* command); + bool HasPermission(std::string &command); /** Calls read() to read some data for this user using their fd. */ @@ -341,4 +341,13 @@ class WhoWasUser time_t signon; }; +void AddOper(userrec* user); +void DeleteOper(userrec* user); +void kill_link(userrec *user,const char* r); +void kill_link_silent(userrec *user,const char* r); +void AddWhoWas(userrec* u); +void AddClient(int socket, char* host, int port, bool iscached, char* ip); +void FullConnectUser(userrec* user); +void ConnectUser(userrec *user); + #endif -- cgit v1.2.3