-#--\r
-#####\r
-####\r
-### Discussion on IRC on how to implement it\r
-##\r
-#\r
-# <tango_> a. do we want user groups together with users?\r
-# <markey> hmm\r
-# <markey> let me think about it\r
-# <markey> generally I would say: as simple as possible while keeping it as flexible as need be\r
-# <tango_> I think we can put user groups in place afterwards if we build the structure right\r
-# <markey> prolly, yes\r
-# <tango_> so\r
-# <tango_> each plugin registers a name\r
-# <tango_> so rather than auth level we have +name -name\r
-# <markey> yes\r
-# <markey> much better\r
-# <tango_> the default is +name for every plugin, except when the plugin tells otherwise\r
-# <markey> although.. \r
-# <markey> if I only want to allow you access to one plugin\r
-# <markey> I have lots of typing to do\r
-# <tango_> nope\r
-# <tango_> we allow things like -*\r
-# <markey> ok\r
-# <tango_> and + has precedence\r
-# <tango_> hm no, not good either\r
-# <tango_> because we want bot -* +onething and +* -onething to work\r
-# <markey> but then: one plugin currently can have several levels, no?\r
-# <tango_> of course\r
-# <markey> commandedit, commanddel, commandfoo\r
-# <tango_> name.command ?\r
-# <markey> yep\r
-# <tango_> (then you can't have dots in commands\r
-# <tango_> maybe name:command\r
-# <markey> or name::comand\r
-# <markey> like a namespace\r
-# <tango_> ehehehe yeah I like it :)\r
-# <tango_> tel\r
-# <tango_> brb\r
-# <markey> usermod setcaps eean -*\r
-# <markey> usermod setcaps eean +quiz::edit\r
-# <markey> great\r
-# <markey> or even\r
-# <markey> auth eean -*, +quiz::edit\r
-# <markey> awesome\r
-# <markey> auth eean -*, +quiz::edit, +command, -command::del\r
-# <tango_> yes\r
-# <markey> you know, the default should be -*\r
-# <markey> because\r
-# <markey> in the time between adding the user and changing auth\r
-# <markey> it's insecure\r
-# <markey> user could do havoc\r
-# <markey> useradd eean, then eean does "~quit", before I change auth\r
-# <tango_> nope\r
-# <markey> perhaps we should allow combining useradd with auth\r
-# <tango_> the default should be +* -important stuff\r
-# <markey> ok\r
-# <tango_> how to specify channel stuff?\r
-# <markey> for one, when you issue the command on the channel itself\r
-# <markey> then it's channel relative\r
-# <markey> perhaps\r
-# <markey> or\r
-# <tango_> yes but I was thinking more about the syntax\r
-# <markey> auth eean #rbot -quiz\r
-# <tango_> hm\r
-# <markey> or maybe: treat channels like users: auth #rbot -quiz\r
-# <markey> would shut up quiz in #rbot\r
-# <markey> hm\r
-# <markey> heh\r
-# <tango_> auth * #rbot -quiz\r
-# <markey> not sure I'm making sense here ;)\r
-# <tango_> I think syntax should be auth [usermask] [channelmask] [modes]\r
-# <markey> yes\r
-# <markey> modes separated by comma?\r
-# <tango_> where channelmask is implied to be *\r
-# <tango_> no we can have it spacesplit\r
-# <markey> great\r
-# <markey> ok\r
-# <tango_> modes are detected by +-\r
-# <tango_> so you can do something like auth markey #rbot -quiz #amarok -chuck\r
-# <markey> also I like "auth" a lot more than "usermod foo"\r
-# <markey> yep\r
-# <tango_> I don't understand why the 'mod'\r
-# <tango_> we could have all auth commands start with use\r
-# <tango_> user\r
-# <tango_> user add\r
-# <tango_> user list\r
-# <tango_> user del\r
-# <markey> yes\r
-# <tango_> user auth\r
-# <tango_> hm\r
-# <tango_> and maybe auth as a synonym for user auth\r
-# <markey> this is also uncomfortable: usermod wants the full user mask\r
-# <markey> you have to copy/paste it\r
-# <tango_> no\r
-# <tango_> can't you use *?\r
-# <markey> sorry not sure\r
-# <markey> but this shows, it's not inuitive\r
-# <markey> I've read the docs\r
-# <markey> but didn't know how to use it really\r
-# <tango_> markey!*@*\r
-# <markey> that's not very intuitive\r
-# <tango_> we could use nick as a synonym for nick!*@* if it's too much for you :D\r
-# <markey> usermod markey foo should suffice\r
-# <markey> rememember: you're a hacker. when rbot gets many new users, they will often be noobs\r
-# <markey> gotta make things simple to use\r
-# <tango_> but the hostmask is only needed for the user creation\r
-# <markey> really? then forget what I said, sorry\r
-# <tango_> I think so\r
-# <tango_> ,help auth\r
-# <testbot> Auth module (User authentication) topics: setlevel, useradd, userdel, usermod, auth, levels, users, whoami, identify\r
-# <tango_> ,help usermod\r
-# <testbot> no help for topic usermod\r
-# <tango_> ,help auth usermod\r
-# <testbot> usermod <username> <item> <value> => Modify <username>s settings. Valid <item>s are: hostmask, (+|-)hostmask, password, level (private addressing only)\r
-# <tango_> see? it's username, not nick :D\r
-# <markey> btw, help usermod should also work\r
-# <tango_> ,help auth useradd\r
-# <testbot> useradd <username> => Add user <mask>, you still need to set him up correctly (private addressing only)\r
-# <markey> instead of help auth usermode\r
-# <markey> when it's not ambiguous\r
-# <tango_> and the help for useradd is wrong\r
-# <markey> for the website, we could make a logo contest :) the current logo looks like giblet made it in 5 minutes ;)\r
-# <markey> ah well, for 1.0 maybe\r
-# <tango_> so a user on rbot is given by\r
-# <tango_> username, password, hostmasks, permissions\r
-# <markey> yup\r
-# <tango_> the default permission is +* -importantstuff\r
-# <markey> how defines importantstuff?\r
-# <markey> you mean like core and auth?\r
-# <tango_> yes\r
-# <markey> ok\r
-# <tango_> but we can decide about this :)\r
-# <markey> some plugins are dangerous by default\r
-# <markey> like command plugin\r
-# <markey> you can do all sorts of nasty shit with it\r
-# <tango_> then command plugin will do something like: command.defaultperm("-command")\r
-# <markey> yes, good point\r
-# <tango_> this is then added to the default permissions (user * channel *)\r
-# <tango_> when checking for auth, we go like this:\r
-# <tango_> hm\r
-# <tango_> check user * channel *\r
-# <tango_> then user name channel *\r
-# <tango_> then user * channel name\r
-# <tango_> then user name channel name\r
-# <tango_> for each of these combinations we match against * first, then against command, and then against command::subcommand\r
-# <markey> yup\r
-# <tango_> setting or resetting it depending on wether it's + or -\r
-# <tango_> the final result gives us the permission\r
-# <tango_> implementation detail\r
-# <tango_> username and passwords are strings\r
-# <markey> (I might rename the command plugin, the name is somewhat confusing)\r
-# <tango_> yeah\r
-# <tango_> hostmasks are hostmasks\r
-# <markey> also I'm pondering to restrict it more: disallow access to @bot\r
-# <tango_> permissions are in the form [ [channel, {command => bool, ...}] ...]\r
-#++\r
-\r
-module Irc\r