Roxen.git
/
server
/
base_server
/
module.pike
version
»
Context lines:
10
20
40
80
file
none
3
Roxen.git/server/base_server/module.pike:1:
#include <module.h>
-
object this = this_object();
+
mapping (string:mixed *) variables=([]);
-
+
object this = this_object();
+
+
string fix_cvs(string from)
+
{
+
from = replace(from, ({ "$Id: module.pike,v 1.4 1996/12/01 19:18:32 per Exp $" }), ({"",""}));
+
sscanf(from, "%*s,v %s", from);
+
return from;
+
}
+
+
string file_name_and_stuff()
+
{
+
return ("<b>Loaded from:</b> "+(roxen->filename(this))+"<br>"+
+
(this->cvs_version?"<b>CVS Version: </b>"+fix_cvs(this->cvs_version)+"<nr>\n":""));
+
}
+
object my_configuration() { object conf; foreach(roxen->configurations, conf) if(conf->otomod[this]) return conf; return 0; } string module_creator;
Roxen.git/server/base_server/module.pike:20:
module_creator = c; } void set_module_url(string to) { module_url = to; } int killvar(string var) {
-
if(!variables[var])
-
error("Killing undefined variable.\n");
+
if(!variables[var]) error("Killing undefined variable.\n");
m_delete(variables, var); return 1; } void free_some_sockets_please(){} void start(void|int num) {} string status() {} string info() {
-
return this->register_module()[2];
+
return
(
this->register_module()[2]
)
;
} // Define a variable, with more than a little error checking... varargs int defvar(string var, mixed value, string name, int type, string doc_str, mixed misc, int|function not_in_config) { if(!strlen(var)) error("No name for variable!\n"); // if(var[0]=='_' && previous_object() != roxen)