Roxen.git
/
server
/
modules
/
examples
/
userdb_ex.pike
version
»
Context lines:
10
20
40
80
file
none
3
Roxen.git/server/modules/examples/userdb_ex.pike:1:
-
// This is a
roxen
module. Copyright © 2001, Roxen IS.
+
// This is a
ChiliMoon
module. Copyright © 2001, Roxen IS.
#include <module.h> inherit UserDB; inherit "module"; //! A user database module should inherit @[UserDB]. //! //! Which those are will be indicated in the documentation for those //! functions below. Also, please note that a userdb module has to //! have the thread_safe flag set to 1.
Roxen.git/server/modules/examples/userdb_ex.pike:13:
constant name = "example"; //! The name of the userdatbase, used to identify it from modules or //! htaccess files or similar that wants to authenticate against a //! specific database instead of against any of them. //! //! The name should be reasonably short and should be unique, however, //! nothing will break if more than one database has the same name, it //! will be impossible to know which of them will be used when //! authentication is done, however..
-
constant cvs_version = "$Id: userdb_ex.pike,v 1.
5
2002/
10
/
23
23
:
31
:
44
nilsson
Exp $";
+
constant cvs_version = "$Id: userdb_ex.pike,v 1.
6
2002/
11
/
11
01
:
51
:
57
mani
Exp $";
constant module_name = "RefDoc for MODULE_USERDB"; constant module_doc = ("This module does nothing special, it implements a simple " "user database with the passwords and usernames in a string list, "
-
"but its inlined documentation gets imported into the
Roxen
"
+
"but its inlined documentation gets imported into the
ChiliMoon
"
"programmer manual.\n" "You definetely don't want to use this module in your virtual " "servers, since anybody with access to your admin interface or " "server configuration file automatically gains access to all "
-
"your passwords. For a budding
roxen
programmer, the module "
+
"your passwords. For a budding
ChiliMoon
programmer, the module "
"however does show the basics of making a user database module."); static void create() // Define a variable that will hold all the users. Only the user id // (the short name) and the password are defined in this list, but it // could easily be extended to include more information. { defvar("users", Variable.StringList(({}), VAR_INITIAL, "Users and Passwords",