splidge [Mon, 10 Mar 2008 18:07:57 +0000 (18:07 +0000)]
Removed NEEDAUTH flag since it didn't do anything useful.
We represent a user who has never authed with lastauth=0. Expiry of never-authed users can be done based on creation time.
Updated the import script to behave accordingly.
splidge [Mon, 10 Mar 2008 16:15:47 +0000 (16:15 +0000)]
Tightened up the auth code a bit.
The user limit check is now done before logging last user@host etc.
Messages are now sent to other account users when someone auths - and a different message sent if the account is at the auth limit.
Fixed up a couple of other incorrect error messages (in removeuser.c).
chancmds/commandlist.c seems to be a changeset or two behind so there's a new one of those too.
splidge [Mon, 10 Mar 2008 15:15:43 +0000 (15:15 +0000)]
Added CHANOPHISTORY command (behaves the same as old Q's AUTHHISTORY). Also added the backend logging of op events.
Tidied up error message in userflags/authhistory (i.e. a message to say you can't list for the named user).
splidge [Mon, 10 Mar 2008 01:05:31 +0000 (01:05 +0000)]
Added suspendtime fields to users and channels.
Updated database code to load and save them as needed.
Updated new channel/user code to initialize them.
Also fixed a bug where the BAN alias wasn't working properly.
splidge [Sun, 9 Mar 2008 15:51:14 +0000 (15:51 +0000)]
Various user friendliness improvements.
Made insufficient parameters message show the usage of the command concerned.
Made some messages a bit friendlier
Changed primary auth command to AUTH (rather than LOGIN)
Fixed up a couple of help messages.
Chris Porter [Sun, 9 Mar 2008 04:33:30 +0000 (04:33 +0000)]
the maildomain implementation has been fixed.
stuff that was wrong that I can rememeber:
- it created a table that had one number of fields, select code expected another number, insert code expected another different number, and update code didn't update most of the fields, but did escape them (though it never used the value).
- lots of uninitalised variables, e.g. flags and account limits
- in the function that built up a tree of domains, the author didn't realise how recursion works, how it should work:
address: blah@kings.cam.ac.uk, kings.cam.ac.uk, cam.ac.uk, ac.uk, uk, ending up with kings.cam.ac.uk->cam.ac.uk->ac.uk->uk
how it was working:
address: blah@kings.cam.ac.uk, kings.cam.ac.uk, cam.ac.uk, ac.uk, uk
now when unwinding the stack, it keeps looking for dots, despite the fact we've recursed already and have the tree!
now it continues in cam.ac.uk looking for dots, so that ends up looking like cam.ac.uk->uk, and the full domain tree ends up as kings.cam.ac.uk->uk
W T F
- didn't check for banned addresses but had the flag defined
- didn't show banned flag in spewdomain code
- all 5 pieces of code that attempted to extract the local part of email address using the wrong half (i.e. the domain)
- hello attempted to check for too many accounts on one email address but got the code wrong, however email didn't check at all
- was using match to compare the local part of email addresses
- was using ircd_strcmp to compare domains
- in hello a user could use up an unlimited amount of memory by passing in new domain for each user, if HELLO failed a maildomain wasn't deallocated.
how did this get committed?
I need to look over this stuff again.
Chris Porter [Sat, 8 Mar 2008 17:06:44 +0000 (17:06 +0000)]
DANGER WILL ROBINSON!
I've removed the suspended check in chanservuser.c, what if users wanted to remove a troublemaker from their channels?
This could have adverse affects, though I can't think of any at this time.
splidge [Sat, 8 Mar 2008 14:22:14 +0000 (14:22 +0000)]
Updated ADDUSER to allow flags to be specified. Fixed a a type buf in op.c
The logic to "sanitise" flags is needed by both adduser and chanlev so has been factored.
Paul [Sat, 8 Mar 2008 14:05:10 +0000 (14:05 +0000)]
Account timestamp of 0 is a 'special' case in snircd, designed to allow a user to reauth to enable someone to go from AC to AC:TS:ID, without reconnecting to irc.
Chris Porter [Sat, 8 Mar 2008 03:28:23 +0000 (03:28 +0000)]
hello now checks for special characters in the desired account name.
the regex init/free functions are now called from the chanserv.c's _init/_free instead of every time the functions using the regexes are called.
why was authlib.c in it's own module? it was causing circular dependencies so it's linked into chanserv.so instead.
splidge [Fri, 7 Mar 2008 22:25:40 +0000 (22:25 +0000)]
Fixed up nick module so it clears the list of nicks authed to each userid when it starts. Needed because you can reload IRC without unloading the authext module...
splidge [Fri, 7 Mar 2008 12:52:31 +0000 (12:52 +0000)]
CHANLEV updates.
Added help text to CHANLEV.
Also modified listing code so masters/owners can't see other people's personal flags. This is to avoid confusion when they cannot be removed.
splidge [Fri, 7 Mar 2008 12:08:07 +0000 (12:08 +0000)]
More help system stuff.
mkcommandlist.pl will now pick out lines tagged CMDHELP: and add their content to the default help string for that command. Added help for LOGIN as proof of concept/test.
splidge [Fri, 7 Mar 2008 12:00:12 +0000 (12:00 +0000)]
Added built-in help support.
Added beginnings of support for "built in" help. Added a new argument to the chanservaddcommand with the help string, this is then presented to the user if no help is found in the database. As yet only "showcommands" actually has any built in help.
splidge [Fri, 7 Mar 2008 11:13:14 +0000 (11:13 +0000)]
Some tidying up of "personal" flags (+ijw on chanlev)
Added a new macro to avoid repeated instances of (QCUFLAG_AUTOINVITE|QCUFLAG_HIDEWELCOME etc)
Updated so that (non-master) users see their own personal flags on a CHANLEV listing (previously these were hidden)
Added logic to remove personal flags from users who aren't known any more (this prevents people with personal flags getting stuck on the chanlev)
splidge [Fri, 7 Mar 2008 10:13:09 +0000 (10:13 +0000)]
Some more tidying of authtracker and related things.
Authtracker used to have 2 ways of getting userID - either from np->auth or via the chanserv macro. These now actually do the same thing so aren't both needed any more.
Also removed the HOOK_CHANSERV_SETUSERID hook as this is now redundant - the userid is always set at ACCOUNT time (for local or remote auths) - we ignore remote ACs without userID set now.
Also a slight tidy of the condition for autocreating auths - we just look for the chanserv extension attached to the user rather than looking up the account name.
Chris Porter [Fri, 7 Mar 2008 03:27:59 +0000 (03:27 +0000)]
Initially HELLO'ed users lastauth is set to 0, however the existing logic that deals with new users coming in off the network hasn't been altered (i.e. it's still time(NULL)).
whois modified to display accounts that have not been used.
cleanupdb now cleans up auths that have never been used after 10 days.
requestpassword now resends the initial HELLO email if the user has never authed.
splidge [Fri, 7 Mar 2008 00:22:31 +0000 (00:22 +0000)]
Various changes to bring us into 2008
Removed "rup" member of activeuser (we now use authext instead)
Removed "nicks" member of reguser (we now use authext instead)
Made auths send out the userid.
Fixed up some of the more gratuitous retardedness I found along the way...
splidge [Thu, 6 Mar 2008 14:05:53 +0000 (14:05 +0000)]
Fixed up isopped vs. iscreate in the join handler.
This should fix the bug where an autoop user joining a channel has their op taken away (by the burst) and not returned.