| Age | Commit message (Collapse) | Author |
|
User has to be authorized in order to be able to change channel's
modes.
|
|
MODE command is used to manage modes of both users and channels. But
since these tasks are quite different it'd be nice to split them to
not have an if statement whose both branches occupe whole function
|
|
At least it is now set to a first user :D
|
|
I thought it'd be fine to store modes as an array. But using this is
awful experience. Take a look at simple NAMES command: it just needs
to check whether some user is oper or voice or not, and with that
approach it will need to iterate over an array of users, and for each
user iterate over an array of modes. Or it is possible to optimize it,
saving all interesting modes to a local buffer and then iterating over
it. But those are attempts to fix broken design
So, instead of array of modes there'll be lots of fields regarding each
mode or kind of mode
From now on (struct Channel).peers is not a simple array of peers, but
the one with metainformation. This is done by making an array of
structures, so there are renames throughout the code
Also, I didn't like that it was users and not peers and this is a nice
opportunity to rename it: in first place this was done to avoid thing
that compiler somehow could silently ignore type change, but this is
also a stylistic change reflecting my view on naming
|
|
- One is missing *
- Second is missing s
|
|
It requires a parameter command, but no caller provided it :/
|
|
SETOPER is a command for config, OPER is the one to authorize a user
|
|
It's incorrect to check for an uppercase letter on a lowercase
string...
|
|
So not it can show who's on the channel, yay. Though, no showing ops
|
|
Now users can query each other
Plus, server info and creation date can be changed without recompiling
using configuration file in IRC message format which is loaded on
startup
TODO: since readcfg uses IRC logic, handle() now should be able to deal
with commands ending with simply \n
|
|
It wasn't very accurate for this time
|
|
Now there can't be single \r or \n in the message, erroneous nicks and
channel names are rejected, and usernames are stripped on '@'
|
|
The one in user.c is the funniest one
|
|
After seeing same announcing code second time I decided it should be
done before an actual quit in loop.c. Plus, channel exiting is now done
in user_remove().
|
|
Now users will be kicked for inactivity o.o
|
|
Then I should make some logic for pinging others...
|
|
Well, it's the same as PRIVMSG but different name
|
|
Well... yes
|
|
- Instead of checking users in the channel check user's channels
- Ensure thing looks really dumb here, so remove it
|
|
|
|
Well, I guess that code is needed more then once, so it'll be good
to move it to some function
|
|
Yay, adding some validation to the data ^^
|
|
|
|
So, now there're all modes listed in RFC 2812. The only what they
do now, though, is a +r restricting user from changing their nick
|
|
Well, it's more appropriate for that function to handle this rather
than for ircd(). Now code looks simpler, ircd() is not that complex,
and support for optional quit message is present
|
|
Though they don't have modes, and JOIN/PART must be able to parse
comma separated list of channels
|
|
|