summaryrefslogtreecommitdiff
path: root/src/channels.cpp
AgeCommit message (Collapse)Author
2014-04-09Avoid double Membership lookup in Channel::UserList()Attila Molnar
The user is always inside if UserList() is called from ForceJoin() and the HasUser() result obtained in the /NAMES handler can be reused
2014-04-09Move checks determining whether a user is allowed to view the NAMES list of ↵Attila Molnar
a channel from Channel::UserList() to cmd_names
2014-04-09Eliminate usage of has_one in Channel::UserList()Attila Molnar
2014-04-07Merge insp20Attila Molnar
2014-03-31Check if Membership::GetPrefixChar() returns 0 before appending it to a stringAttila Molnar
Spotted by @barosl
2014-03-14Change allocation of InspIRCd::chanlist to be physically part of the object ↵Attila Molnar
containing it
2014-03-13Fix NAMES list getting truncated on servers having an excessively long ↵Attila Molnar
server name
2014-03-13Backport "Refactor Channel::UserList() to use std::string"Attila Molnar
This gets rid of questionable snprintf() usage, reported by @hifi Backported commit: 8a06d54076551387f83a29360478ee6605e241b6
2014-02-21Index Channel::modes and User::modes with the id of the mode instead of its ↵Attila Molnar
letter
2014-02-15Add ParamModeBase and ParamMode, change all parameter modes to inherit from ↵Attila Molnar
ParamMode - Type of the extension used to store data is a template parameter - The extension is automatically unset when the mode is unset - Handlers inheriting from ParamMode have to provide OnSet() and SerializeParam(); may optionally provide OnUnset() - Transparently handle the case when OnSet() modifies the mode parameter - Remove Channel::custom_mode_params map; ask the mode handlers to serialize their parameters instead
2014-02-14Move GetAllPrefixChars() from Channel to MembershipAttila Molnar
2014-02-14Move GetPrefixChar() from Channel to MembershipAttila Molnar
2014-01-31Remove some dead codeAttila Molnar
2014-01-25Destroy Memberships of a quitting user in QuitUser() instead of in cull()Attila Molnar
2014-01-24Convert InviteBase::invites to an intrusively linked listAttila Molnar
2014-01-24Remove classbase inheritance from InvitationAttila Molnar
2014-01-24Convert UserChanList to an intrusively linked listAttila Molnar
2014-01-21Merge insp20Attila Molnar
2014-01-21Fix some logically dead code which was found by Coverity.Peter Powell
2014-01-04Show +i users on a channel to opers having the channels/auspex priv who do ↵Attila Molnar
/NAMES from outside of the chan Discovered by @Cronus89
2013-12-15Make various self contained methods static.Peter Powell
- InspIRCd::IsValidMask - InspIRCd::TimeString
2013-11-12Use WriteNumeric() everywhere we send numerics and include the user's nick ↵Adam
automatically
2013-09-11Move prefix mode specific fields and getters into PrefixModeattilamolnar
Add ModeHandler::IsPrefixMode()
2013-09-11Create a base class for prefix modesattilamolnar
Move Channel::SetPrefix() into Membership
2013-08-22Fix a few problemsattilamolnar
- Fix configuration issue on systems without both GnuTLS and OpenSSL. (@SaberUK) - Do not set Membership::modes in ForceJoin() incorrectly to privs - Fix crash when spanningtree detects a configuration error on load
2013-08-12Clean up a few constructorsattilamolnar
Do not silently correct a zero TS in Channel::Channel(); require callers to supply a valid TS instead
2013-08-10Require privs given on initial join to be in <options:defaultmodes>.Peter Powell
2013-08-04Change the syntax of FOREACH macros to be less dumb.Adam
2013-07-19Replace hardcoded mode letters, part 3attilamolnar
This changes most remaining User::IsModeSet() calls to use ModeReferences for modes that were created by other modules or the core
2013-07-19Replace hardcoded mode letters, part 2attilamolnar
This changes all remaining Channel::IsModeSet() and Channel::GetModeParameter() calls to use ModeReferences for modes that were created by other modules or the core
2013-07-19Seperate ModeReference into ChanModeReference and UserModeReferenceattilamolnar
2013-07-04Remove $Core and $Mod* comments apart from $ModDep.Peter Powell
2013-07-01Replace hardcoded mode letters passed to IsModeSet() and GetModeParameter() ↵attilamolnar
with ModeHandlers, part 1
2013-07-01Fix a few oversightsattilamolnar
This partially reverts e0cb6bd46fb1d804ad6adea5688c844f7e1a0f6f
2013-06-16Always set the topic in Channel::SetTopic(), move access checks into cmd_topicattilamolnar
2013-06-13Call Channel::SetModeParam() from the mode parser when needed instead of ↵attilamolnar
requiring mode handlers to do it
2013-06-04Refactor Channel::UserList() to use std::stringattilamolnar
2013-06-04Remove the now unused Channel::RemoveAllPrefixes() and CountInvisible()attilamolnar
2013-06-04Reduce User* -> Membership* lookups on part and kickattilamolnar
2013-06-04Channel::KickUser() and cmd_kick changesattilamolnar
- Remove uline checks from KickUser() - Disallow the kick if done by a local user and the victim is ulined in cmd_kick - Remove call to RemoveAllPrefixes() as it has no additional effect, the Membership object containing the prefixes is destroyed soon after the call
2013-06-04Remove NULL checks from various Channel functionsattilamolnar
Passing NULL to these functions are not permitted and must be avoided by the caller
2013-06-02Move a few trivial functions into headersattilamolnar
2013-05-18Replaced vsnprintf with VAFORMAT pretty much everywhere.Daniel Vassdal
2013-05-16Remove unused variables, avoid copies where possible, check empty() instead ↵attilamolnar
of size() == 0 Most of these were detected by cppcheck
2013-05-16Get rid of strlcpy(), strlcat(), charlcat() and charremove()attilamolnar
2013-05-15Replace some C-isms with C++-isms.Peter Powell
* 'const char*' to 'const std::string&'. * snprintf to std::string concatenation. * Replace duplicated OneOfMatches with InspIRCd::MatchMask.
2013-04-28Merge insp20attilamolnar
2013-04-21Don't crop the channel name if it's too long in Channel::Channel()attilamolnar
...and especially don't use the shortened name in one place and the original in another Having different <limits:maxchan> values on the same network is not supported
2013-04-13Channel::JoinUser() and Channel::ForceChan() changesattilamolnar
Convert static Channel::ForceChan() to non-static Channel::ForceJoin() that joins a user to a channel, no permission checks The (static) Channel::JoinUser() now has a LocalUser parameter, and no longer have TS and bursting parameters. If the channel doesn't exist, it is created using current time as TS
2013-04-13OnUserPreJoin is a local-only hook, change User* parameter to LocalUser*attilamolnar