]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/users.h
Remove const char* versions of InspIRCd::FindNick()/FindNickOnly()/FindUUID()/FindChan()
[user/henk/code/inspircd.git] / include / users.h
index 4d3013ae805f600ba9a04e844b5b4bed8f36cf0c..def7a146d9dd5907493cfa2510428fab2e207fd3 100644 (file)
@@ -22,8 +22,7 @@
  */
 
 
-#ifndef USERS_H
-#define USERS_H
+#pragma once
 
 #include "socket.h"
 #include "inspsocket.h"
@@ -421,7 +420,7 @@ class CoreExport User : public Extensible
         * oper information can be obtained from User::oper
         * @return True if the user is an oper, false otherwise
         */
-       bool IsOper() const { return (oper != NULL); }
+       bool IsOper() const { return oper; }
 
        /** Returns true if a notice mask is set
         * @param sm A notice mask character to check
@@ -833,23 +832,18 @@ class CoreExport LocalUser : public User, public InviteBase
        InviteList& GetInviteList();
 
        /** Returns true if a user is invited to a channel.
-        * @param channel A channel name to look up
+        * @param channel A channel to look up
         * @return True if the user is invited to the given channel
         */
-       bool IsInvited(const irc::string &channel);
-
-       /** Adds a channel to a users invite list (invites them to a channel)
-        * @param channel A channel name to add
-        * @param timeout When the invite should expire (0 == never)
-        */
-       void InviteTo(const irc::string &channel, time_t timeout);
+       bool IsInvited(Channel* chan) { return (Invitation::Find(chan, this) != NULL); }
 
        /** 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.
         * @param channel The channel to remove the invite to
+        * @return True if the user was invited to the channel and the invite was erased, false if the user wasn't invited
         */
-       void RemoveInvite(const irc::string &channel);
+       bool RemoveInvite(Channel* chan);
 
        void RemoveExpiredInvites();
 
@@ -953,5 +947,3 @@ class CoreExport UserResolver : public Resolver
         */
        void OnError(ResolverError e, const std::string &errormessage);
 };
-
-#endif