aboutsummaryrefslogtreecommitdiffstats
path: root/irc/unreal/files
diff options
context:
space:
mode:
Diffstat (limited to 'irc/unreal/files')
-rw-r--r--irc/unreal/files/patch-config.h29
-rw-r--r--irc/unreal/files/patch-example.conf34
-rw-r--r--irc/unreal/files/patch-ircd.c14
-rw-r--r--irc/unreal/files/patch-makenet17
-rw-r--r--irc/unreal/files/patch-modules.c53
-rw-r--r--irc/unreal/files/patch-s_conf.c11
-rw-r--r--irc/unreal/files/patch-url.c20
-rw-r--r--irc/unreal/files/unrealircd.sh.in31
8 files changed, 209 insertions, 0 deletions
diff --git a/irc/unreal/files/patch-config.h b/irc/unreal/files/patch-config.h
new file mode 100644
index 000000000000..d29dce038909
--- /dev/null
+++ b/irc/unreal/files/patch-config.h
@@ -0,0 +1,29 @@
+--- include/config.h Sun Mar 13 22:02:43 2005
++++ include/config.h Mon Mar 21 09:10:41 2005
+@@ -201,16 +201,16 @@
+ * these are only the recommened names and paths. Change as needed.
+ * You must define these to something, even if you don't really want them.
+ */
+-#define CPATH "unrealircd.conf" /* server configuration file */
+-#define MPATH "ircd.motd" /* server MOTD file */
+-#define SMPATH "ircd.smotd" /* short MOTD file */
+-#define RPATH "ircd.rules" /* server rules file */
+-#define OPATH "oper.motd" /* Operators MOTD file */
+-#define LPATH "debug.log" /* Where the debug file lives, if DEBUGMODE */
+-#define PPATH "ircd.pid" /* file for server pid */
+-#define VPATH "ircd.svsmotd" /* Services MOTD append. */
+-#define BPATH "bot.motd" /* Bot MOTD */
+-#define IRCDTUNE "ircd.tune" /* tuning .. */
++#define CPATH "%%PREFIX%%/etc/Unreal/unrealircd.conf" /* server configuration file */
++#define MPATH "%%PREFIX%%/etc/Unreal/ircd.motd" /* server MOTD file */
++#define SMPATH "%%PREFIX%%/etc/Unreal/ircd.smotd" /* short MOTD file */
++#define RPATH "%%PREFIX%%/etc/Unreal/ircd.rules" /* server rules file */
++#define OPATH "%%PREFIX%%/etc/Unreal/oper.motd" /* Operators MOTD file */
++#define LPATH "%%LOGDIR%%/debug.log" /* Where the debug file lives, if DEBUGMODE */
++#define PPATH "%%RUNDIR%%/ircd.pid" /* file for server pid */
++#define VPATH "%%PREFIX%%/etc/Unreal/ircd.svsmotd" /* Services MOTD append. */
++#define BPATH "%%PREFIX%%/etc/Unreal/bot.motd" /* Bot MOTD */
++#define IRCDTUNE "%%RUNDIR%%/ircd.tune" /* tuning .. */
+
+ /* CHROOTDIR
+ *
diff --git a/irc/unreal/files/patch-example.conf b/irc/unreal/files/patch-example.conf
new file mode 100644
index 000000000000..9c2c204ac04c
--- /dev/null
+++ b/irc/unreal/files/patch-example.conf
@@ -0,0 +1,34 @@
+--- doc/example.conf Wed Oct 27 20:45:03 2004
++++ doc/example.conf Mon Feb 7 03:58:38 2005
+@@ -31,8 +31,8 @@
+ */
+
+ /* FOR *NIX, uncomment the following 2lines: */
+-//loadmodule "src/modules/commands.so";
+-//loadmodule "src/modules/cloak.so";
++//loadmodule "%%PREFIX%%/lib/Unreal/commands.so";
++//loadmodule "%%PREFIX%%/lib/Unreal/cloak.so";
+
+ /* FOR Windows, uncomment the following 2 lines: */
+ //loadmodule "modules/commands.dll";
+@@ -374,7 +374,7 @@
+ * };
+ */
+
+-log "ircd.log" {
++log "%%LOGDIR%%/ircd.log" {
+ /* Delete the log file and start a new one when it reaches 2MB, leave this out to always use the
+ same log */
+ maxsize 2097152;
+@@ -520,8 +520,8 @@
+
+ tld {
+ mask *@*.fr;
+- motd "ircd.motd.fr";
+- rules "ircd.rules.fr";
++ motd "ircd.motd";
++ rules "ircd.rules";
+ };
+
+ /* note: you can just delete the example block above,
+
diff --git a/irc/unreal/files/patch-ircd.c b/irc/unreal/files/patch-ircd.c
new file mode 100644
index 000000000000..ea4581e93bf2
--- /dev/null
+++ b/irc/unreal/files/patch-ircd.c
@@ -0,0 +1,14 @@
+--- src/ircd.c Wed Oct 27 20:45:26 2004
++++ src/ircd.c Mon Feb 7 04:19:55 2005
+@@ -1182,9 +1182,9 @@
+ }
+ #endif
+ #ifndef _WIN32
+- mkdir("tmp", S_IRUSR|S_IWUSR|S_IXUSR); /* Create the tmp dir, if it doesn't exist */
++ mkdir("%%RUNDIR%%/tmp", S_IRUSR|S_IWUSR|S_IXUSR); /* Create the tmp dir, if it doesn't exist */
+ #else
+- mkdir("tmp");
++ mkdir("%%RUNDIR%%/tmp");
+ #endif
+ #ifndef _WIN32
+ /*
diff --git a/irc/unreal/files/patch-makenet b/irc/unreal/files/patch-makenet
new file mode 100644
index 000000000000..d9aaace3f3a4
--- /dev/null
+++ b/irc/unreal/files/patch-makenet
@@ -0,0 +1,17 @@
+--- networks/makenet Sun Apr 25 01:19:28 2004
++++ networks/makenet Mon Feb 7 04:24:00 2005
+@@ -241,10 +241,10 @@
+ __EOF__
+
+ echo ""
+-echo "" >> ../unrealircd.conf
+-echo "// Added by makenet $DATE" >> ../unrealircd.conf
+-echo "include \"networks/$FILE\";" >> ../unrealircd.conf
+-echo "All done. I have added \"include \"networks/$FILE\"; to your unrealircd.conf"
++echo "" >> %%PREFIX%%/etc/Unreal/unrealircd.conf
++echo "// Added by makenet $DATE" >> %%PREFIX%%/etc/Unreal/unrealircd.conf
++echo "include \"%%PREFIX%%/share/Unreal/networks/$FILE\";" >> %%PREFIX%%/etc/Unreal/unrealircd.conf
++echo "All done. I have added \"include \"%%PREFIX%%/share/Unreal/networks/$FILE\"; to your unrealircd.conf"
+ echo "You might want to edit it if you have done makenet before"
+ echo "Thank you for choosing UnrealIRCd"
+ exit
diff --git a/irc/unreal/files/patch-modules.c b/irc/unreal/files/patch-modules.c
new file mode 100644
index 000000000000..712d073c5682
--- /dev/null
+++ b/irc/unreal/files/patch-modules.c
@@ -0,0 +1,53 @@
+--- src/modules.c Wed Oct 27 20:45:27 2004
++++ src/modules.c Mon Feb 7 04:01:47 2005
+@@ -90,12 +90,12 @@
+ {
+ char tempbuf[PATH_MAX+1];
+ #ifndef _WIN32
+- DIR *fd = opendir("tmp");
++ DIR *fd = opendir("%%RUNDIR%%/tmp");
+ struct dirent *dir;
+
+ if (!fd) /* Ouch.. this is NOT good!! */
+ {
+- config_error("Unable to open 'tmp' directory: %s, please create one with the appropriate permissions",
++ config_error("Unable to open '%%RUNDIR%%' directory: %s, please create one with the appropriate permissions",
+ strerror(errno));
+ if (!loop.ircd_booted)
+ exit(7);
+@@ -106,7 +106,7 @@
+ {
+ if (!strcmp(dir->d_name, ".") || !strcmp(dir->d_name, ".."))
+ continue;
+- strcpy(tempbuf, "tmp/");
++ strcpy(tempbuf, "%%RUNDIR%%/tmp/");
+ strcat(tempbuf, dir->d_name);
+ remove(tempbuf);
+ }
+@@ -118,7 +118,7 @@
+ {
+ if (strcmp(hData.cFileName, ".") || strcmp(hData.cFileName, ".."))
+ {
+- strcpy(tempbuf, "tmp/");
++ strcpy(tempbuf, "%%RUNDIR%%/tmp/");
+ strcat(tempbuf, hData.cFileName);
+ remove(tempbuf);
+ }
+@@ -127,7 +127,7 @@
+ {
+ if (!strcmp(hData.cFileName, ".") || !strcmp(hData.cFileName, ".."))
+ continue;
+- strcpy(tempbuf, "tmp/");
++ strcpy(tempbuf, "%%RUNDIR%%/tmp/");
+ strcat(tempbuf, hData.cFileName);
+ remove(tempbuf);
+ }
+@@ -200,7 +200,7 @@
+ path = path_;
+
+
+- tmppath = unreal_mktemp("tmp", unreal_getfilename(path));
++ tmppath = unreal_mktemp("%%RUNDIR%%/tmp", unreal_getfilename(path));
+ if (!tmppath)
+ return "Unable to create temporary file!";
+ if(!strchr(path, '/'))
diff --git a/irc/unreal/files/patch-s_conf.c b/irc/unreal/files/patch-s_conf.c
new file mode 100644
index 000000000000..373b1dec30a1
--- /dev/null
+++ b/irc/unreal/files/patch-s_conf.c
@@ -0,0 +1,11 @@
+--- src/s_conf.c Mon Mar 21 09:10:42 2005
++++ src/s_conf.c Mon Mar 21 09:15:09 2005
+@@ -8609,7 +8609,7 @@
+ {
+ char *urlfile = url_getfilename(url);
+ char *file = unreal_getfilename(urlfile);
+- char *tmp = unreal_mktemp("tmp", file);
++ char *tmp = unreal_mktemp("%%RUNDIR%%/tmp", file);
+ unreal_copyfileex(inc->file, tmp, 1);
+ add_remote_include(tmp, url, 0, NULL);
+ free(urlfile);
diff --git a/irc/unreal/files/patch-url.c b/irc/unreal/files/patch-url.c
new file mode 100644
index 000000000000..ddc4f1fa46d2
--- /dev/null
+++ b/irc/unreal/files/patch-url.c
@@ -0,0 +1,20 @@
+--- src/url.c Sat Jul 3 21:04:31 2004
++++ src/url.c Mon Feb 7 04:31:06 2005
+@@ -141,7 +141,7 @@
+ CURLcode res;
+ char *file = url_getfilename(url);
+ char *filename = unreal_getfilename(file);
+- char *tmp = unreal_mktemp("tmp", filename ? filename : "download.conf");
++ char *tmp = unreal_mktemp("%%RUNDIR%%/tmp", filename ? filename : "download.conf");
+ FILE *fd;
+
+
+@@ -236,7 +236,7 @@
+ {
+ char *file = url_getfilename(url);
+ char *filename = unreal_getfilename(file);
+- char *tmp = unreal_mktemp("tmp", filename ? filename : "download.conf");
++ char *tmp = unreal_mktemp("%%RUNDIR%%/tmp", filename ? filename : "download.conf");
+ FileHandle *handle = malloc(sizeof(FileHandle));
+ handle->fd = fopen(tmp, "wb");
+ if (!handle->fd)
diff --git a/irc/unreal/files/unrealircd.sh.in b/irc/unreal/files/unrealircd.sh.in
new file mode 100644
index 000000000000..e2b14c722393
--- /dev/null
+++ b/irc/unreal/files/unrealircd.sh.in
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: unrealircd
+# REQUIRE: NETWORKING SERVERS
+# BEFORE: DAEMON
+# KEYWORD: shutdown
+
+#
+# Add the following line to /etc/rc.conf to enable Unreal IRCd:
+# unrealircd_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable Unreal IRCd
+#
+
+. %%RC_SUBR%%
+
+name="unrealircd"
+rcvar=`set_rcvar`
+
+command="%%PREFIX%%/libexec/ircd"
+pidfile="%%RUNDIR%%/ircd.pid"
+
+[ -z "$unrealircd_enable" ] && unrealircd_enable="NO"
+
+required_dirs="%%RUNDIR%% %%RUNDIR%%/tmp"
+required_files="%%PREFIX%%/etc/Unreal/unrealircd.conf"
+
+load_rc_config $name
+run_rc_command "$1"