packages: eggdrop/eggdrop-topicprot.patch - updated from .zip, plus minor c...
glen
glen at pld-linux.org
Sat Mar 31 18:26:14 CEST 2012
Author: glen Date: Sat Mar 31 16:26:14 2012 GMT
Module: packages Tag: HEAD
---- Log message:
- updated from .zip, plus minor chunk fix:
http://www.egghelp.org/files/patches/topicprot1.6.19.zip
---- Files affected:
packages/eggdrop:
eggdrop-topicprot.patch (1.5 -> 1.6)
---- Diffs:
================================================================
Index: packages/eggdrop/eggdrop-topicprot.patch
diff -u packages/eggdrop/eggdrop-topicprot.patch:1.5 packages/eggdrop/eggdrop-topicprot.patch:1.6
--- packages/eggdrop/eggdrop-topicprot.patch:1.5 Sat Mar 31 14:21:33 2012
+++ packages/eggdrop/eggdrop-topicprot.patch Sat Mar 31 18:26:09 2012
@@ -1,7 +1,7 @@
-diff -burNp eggdrop1.6.19/src/chan.h eggdrop1.6.19.new/src/chan.h
---- eggdrop1.6.19/src/chan.h 2008-02-16 22:41:03.000000000 +0100
-+++ eggdrop1.6.19.new/src/chan.h 2008-09-22 11:27:30.636306556 +0200
-@@ -191,6 +191,7 @@ struct chanset_t {
+diff -urN eggdrop1.6.19/src/chan.h eggdrop1.6.19-topicprot/src/chan.h
+--- eggdrop1.6.19/src/chan.h 2008-02-16 22:41:03.000000000 +0100
++++ eggdrop1.6.19-topicprot/src/chan.h 2008-07-26 11:28:08.000000000 +0200
+@@ -191,6 +191,7 @@
int mode_mns_prot; /* modes to reject */
int limit_prot; /* desired limit */
char key_prot[121]; /* desired password */
@@ -9,16 +9,16 @@
char pls[21]; /* positive mode changes */
char mns[21]; /* negative mode changes */
char *key; /* new key to set */
-diff -burNp eggdrop1.6.19/src/chanprog.c eggdrop1.6.19.new/src/chanprog.c
---- eggdrop1.6.19/src/chanprog.c 2008-02-16 22:41:03.000000000 +0100
-+++ eggdrop1.6.19.new/src/chanprog.c 2008-09-22 11:30:50.744325464 +0200
-@@ -690,3 +690,24 @@ int isowner(char *name)
-
+diff -urN eggdrop1.6.19/src/chanprog.c eggdrop1.6.19-topicprot/src/chanprog.c
+--- eggdrop1.6.19/src/chanprog.c 2008-02-16 22:41:03.000000000 +0100
++++ eggdrop1.6.19-topicprot/src/chanprog.c 2008-07-26 11:28:09.000000000 +0200
+@@ -690,3 +690,23 @@
+
return 0;
}
+
+/* If we have a protected topic and the bot is opped, halfoped,
-+ * or the channel is -t, change the topic. (Sup 11May2001)
++* or the channel is -t, change the topic. (Sup 11May2001)
+*/
+void check_topic(struct chanset_t *chan)
+{
@@ -36,18 +36,18 @@
+ dprintf(DP_SERVER, "TOPIC %s :%s\n", chan->name, chan->topic_prot);
+ }
+}
-+
---- eggdrop1.6.21/src/mod/channels.mod/channels.c~ 2012-03-31 04:33:59.000000000 +0300
-+++ eggdrop1.6.21/src/mod/channels.mod/channels.c 2012-03-31 04:34:36.050919651 +0300
-@@ -385,6 +385,7 @@ static void write_channels()
+diff -urN eggdrop1.6.19/src/mod/channels.mod/channels.c eggdrop1.6.19-topicprot/src/mod/channels.mod/channels.c
+--- eggdrop1.6.19/src/mod/channels.mod/channels.c 2008-02-16 22:41:06.000000000 +0100
++++ eggdrop1.6.19-topicprot/src/mod/channels.mod/channels.c 2008-07-26 11:28:09.000000000 +0200
+@@ -385,6 +385,7 @@
FILE *f;
char s[121], w[1024], w2[1024], name[163];
char need1[242], need2[242], need3[242], need4[242], need5[242];
+ char topic[1002];
struct chanset_t *chan;
struct udef_struct *ul;
-
-@@ -405,6 +406,7 @@ static void write_channels()
+
+@@ -405,6 +406,7 @@
convert_element(chan->dname, name);
get_mode_protect(chan, w);
convert_element(w, w2);
@@ -73,19 +73,21 @@
chan->revenge_mode, need1, need2, need3, need4, need5,
chan->flood_pub_thr, chan->flood_pub_time,
chan->flood_ctcp_thr, chan->flood_ctcp_time,
---- eggdrop1.6.19/src/mod/channels.mod/cmdschan.c 2008-02-16 22:41:07.000000000 +0100
-+++ eggdrop1.6.19.new/src/mod/channels.mod/cmdschan.c 2008-09-22 11:37:38.571477034 +0200
-@@ -1269,6 +1269,7 @@ static void cmd_chaninfo(struct userrec
+diff -urN eggdrop1.6.19/src/mod/channels.mod/cmdschan.c eggdrop1.6.19-topicprot/src/mod/channels.mod/cmdschan.c
+--- eggdrop1.6.19/src/mod/channels.mod/cmdschan.c 2008-02-16 22:41:07.000000000 +0100
++++ eggdrop1.6.19-topicprot/src/mod/channels.mod/cmdschan.c 2008-07-26 21:59:43.000000000 +0200
+@@ -1268,7 +1268,7 @@
+ dprintf(idx, "Settings for %s channel %s:\n",
channel_static(chan) ? "static" : "dynamic", chan->dname);
get_mode_protect(chan, work);
- dprintf(idx, "Protect modes (chanmode): %s\n", work[0] ? work : "None");
+- dprintf(idx, "Protect modes (chanmode): %s\n", work[0] ? work : "None");
+ dprintf(idx, "Protect topic: %s\n", chan->topic_prot[0] ? chan->topic_prot : "None");
if (chan->idle_kick)
dprintf(idx, "Idle Kick after (idle-kick): %d\n", chan->idle_kick);
else
-diff -burNp eggdrop1.6.19/src/mod/channels.mod/help/chaninfo.help eggdrop1.6.19.new/src/mod/channels.mod/help/chaninfo.help
---- eggdrop1.6.19/src/mod/channels.mod/help/chaninfo.help 2003-02-02 05:20:44.000000000 +0100
-+++ eggdrop1.6.19.new/src/mod/channels.mod/help/chaninfo.help 2008-09-22 11:42:29.504962817 +0200
+diff -urN eggdrop1.6.19/src/mod/channels.mod/help/chaninfo.help eggdrop1.6.19-topicprot/src/mod/channels.mod/help/chaninfo.help
+--- eggdrop1.6.19/src/mod/channels.mod/help/chaninfo.help 2003-02-02 05:20:44.000000000 +0100
++++ eggdrop1.6.19-topicprot/src/mod/channels.mod/help/chaninfo.help 2008-07-26 11:28:08.000000000 +0200
@@ -4,6 +4,7 @@
It shows any of the following:
%bchanmode%b These modes are enforced on the channel. Both + and -
@@ -94,34 +96,34 @@
%bidle-kick%b Kick idle users that are not +f or above on the channel
after how many minutes (set this to 0 to disable).
%{+n}
-diff -burNp eggdrop1.6.19/src/mod/channels.mod/tclchan.c eggdrop1.6.19.new/src/mod/channels.mod/tclchan.c
---- eggdrop1.6.19/src/mod/channels.mod/tclchan.c 2008-02-16 22:41:07.000000000 +0100
-+++ eggdrop1.6.19.new/src/mod/channels.mod/tclchan.c 2008-09-22 11:46:12.888320583 +0200
-@@ -1223,6 +1223,15 @@ static int tcl_channel_modify(Tcl_Interp
+diff -urN eggdrop1.6.19/src/mod/channels.mod/tclchan.c eggdrop1.6.19-topicprot/src/mod/channels.mod/tclchan.c
+--- eggdrop1.6.19/src/mod/channels.mod/tclchan.c 2008-02-16 22:41:07.000000000 +0100
++++ eggdrop1.6.19-topicprot/src/mod/channels.mod/tclchan.c 2008-07-26 11:28:14.000000000 +0200
+@@ -1223,6 +1223,15 @@
return TCL_ERROR;
}
chan->invite_time = atoi(item[i]);
-+ } else if (!strcmp(item[i], "topic")) {
-+ i++;
-+ if (i >= items) {
-+ if (irp)
-+ Tcl_AppendResult(irp, "channel topic needs argument", NULL);
-+ return TCL_ERROR;
-+ }
-+ strncpyz(chan->topic_prot, item[i], sizeof(chan->topic_prot));
-+ check_topic(chan);
++ } else if (!strcmp(item[i], "topic")) {
++ i++;
++ if (i >= items) {
++ if (irp)
++ Tcl_AppendResult(irp, "channel topic needs argument", NULL);
++ return TCL_ERROR;
++ }
++ strncpyz(chan->topic_prot, item[i], sizeof(chan->topic_prot));
++ check_topic(chan);
} else if (!strcmp(item[i], "+enforcebans"))
chan->status |= CHAN_ENFORCEBANS;
else if (!strcmp(item[i], "-enforcebans"))
-diff -burNp eggdrop1.6.19/src/mod/irc.mod/chan.c eggdrop1.6.19.new/src/mod/irc.mod/chan.c
+diff -urN eggdrop1.6.19/src/mod/irc.mod/chan.c eggdrop1.6.19-topicprot/src/mod/irc.mod/chan.c
--- eggdrop1.6.19/src/mod/irc.mod/chan.c 2008-02-16 22:41:09.000000000 +0100
-+++ eggdrop1.6.19.new/src/mod/irc.mod/chan.c 2008-09-22 11:51:07.921436628 +0200
-@@ -1513,12 +1513,14 @@ static int gottopic(char *from, char *ms
++++ eggdrop1.6.19-topicprot/src/mod/irc.mod/chan.c 2008-07-26 11:28:08.000000000 +0200
+@@ -1513,12 +1513,14 @@
memberlist *m;
struct chanset_t *chan;
struct userrec *u;
+ struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
-
+
chname = newsplit(&msg);
fixcolon(msg);
u = get_user_by_host(from);
@@ -131,7 +133,7 @@
if (chan) {
putlog(LOG_JOIN, chan->dname, "Topic changed on %s by %s!%s: %s",
chan->dname, nick, from, msg);
-@@ -1527,6 +1529,8 @@ static int gottopic(char *from, char *ms
+@@ -1527,6 +1529,8 @@
m->last = now;
set_topic(chan, msg);
check_tcl_topc(nick, from, u, chan->dname, msg);
@@ -140,7 +142,7 @@
}
return 0;
}
-@@ -1545,6 +1549,7 @@ static int got331(char *from, char *msg)
+@@ -1545,6 +1549,7 @@
if (chan) {
set_topic(chan, NULL);
check_tcl_topc("*", "*", NULL, chan->dname, "");
@@ -148,7 +150,7 @@
}
return 0;
}
-@@ -1564,6 +1569,7 @@ static int got332(char *from, char *msg)
+@@ -1564,6 +1569,7 @@
fixcolon(msg);
set_topic(chan, msg);
check_tcl_topc("*", "*", NULL, chan->dname, msg);
@@ -156,70 +158,74 @@
}
return 0;
}
-diff -burNp eggdrop1.6.19/src/mod/irc.mod/cmdsirc.c eggdrop1.6.19.new/src/mod/irc.mod/cmdsirc.c
---- eggdrop1.6.19/src/mod/irc.mod/cmdsirc.c 2008-02-16 22:41:09.000000000 +0100
-+++ eggdrop1.6.19.new/src/mod/irc.mod/cmdsirc.c 2008-09-22 11:55:02.514726004 +0200
-@@ -898,6 +898,7 @@ static void cmd_channel(struct userrec *
+diff -urN eggdrop1.6.19/src/mod/irc.mod/cmdsirc.c eggdrop1.6.19-topicprot/src/mod/irc.mod/cmdsirc.c
+--- eggdrop1.6.19/src/mod/irc.mod/cmdsirc.c 2008-02-16 22:41:09.000000000 +0100
++++ eggdrop1.6.19-topicprot/src/mod/irc.mod/cmdsirc.c 2008-07-26 11:28:11.000000000 +0200
+@@ -898,6 +898,7 @@
static void cmd_topic(struct userrec *u, int idx, char *par)
{
struct chanset_t *chan;
+ struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
-
+
if (par[0] && (strchr(CHANMETA, par[0]) != NULL)) {
char *chname = newsplit(&par);
-@@ -923,6 +924,13 @@ static void cmd_topic(struct userrec *u,
+@@ -923,6 +924,13 @@
dprintf(idx, "I'm not a channel op or halfop on %s and the channel is "
"+t.\n", chan->dname);
else {
+ if (chan->topic_prot[0]) {
+ get_user_flagrec(u, &fr, chan->dname);
+ if (!glob_master(fr) && !chan_master(fr)) {
-+ dprintf(idx, "The topic of %s is protected.\n", chan->dname);
-+ return;
++ dprintf(idx, "The topic of %s is protected.\n", chan->dname);
++ return;
+ }
+ }
dprintf(DP_SERVER, "TOPIC %s :%s\n", chan->name, par);
dprintf(idx, "Changing topic...\n");
putlog(LOG_CMDS, "*", "#%s# (%s) topic %s", dcc[idx].nick,
-diff -burNp eggdrop1.6.19/src/mod/irc.mod/mode.c eggdrop1.6.19.new/src/mod/irc.mod/mode.c
---- eggdrop1.6.19/src/mod/irc.mod/mode.c 2008-02-16 22:41:09.000000000 +0100
-+++ eggdrop1.6.19.new/src/mod/irc.mod/mode.c 2008-09-22 12:00:05.134685721 +0200
-@@ -460,8 +460,10 @@ static void got_op(struct chanset_t *cha
+diff -urN eggdrop1.6.19/src/mod/irc.mod/mode.c eggdrop1.6.19-topicprot/src/mod/irc.mod/mode.c
+--- eggdrop1.6.19/src/mod/irc.mod/mode.c 2008-02-16 22:41:09.000000000 +0100
++++ eggdrop1.6.19-topicprot/src/mod/irc.mod/mode.c 2008-07-26 11:28:12.000000000 +0200
+@@ -460,9 +460,11 @@
}
}
m->flags |= WASOP;
- if (check_chan)
+ if (check_chan) {
recheck_channel(chan, 1);
+-}
+ check_topic(chan);
+ }
- }
-
++ }
+
static void got_halfop(struct chanset_t *chan, char *nick, char *from,
-@@ -549,8 +551,10 @@ static void got_halfop(struct chanset_t
+ char *who, struct userrec *opu,
+@@ -549,9 +551,11 @@
}
}
m->flags |= WASHALFOP;
- if (check_chan)
+ if (check_chan) {
recheck_channel(chan, 1);
+-}
+ check_topic(chan);
+ }
- }
-
++ }
+
static void got_deop(struct chanset_t *chan, char *nick, char *from,
-@@ -1246,6 +1250,8 @@ static int gotmode(char *from, char *ori
+ char *who, struct userrec *opu)
+@@ -1246,6 +1250,8 @@
(chan->mode_mns_prot & todo)))
add_mode(chan, ms2[0] == '+' ? '-' : '+', *chg, "");
}
-+ if ((ms2[0] == '-') && ((*chg == 't') || (*chg == 'h')))
++ if ((ms2[0] == '-') && ((*chg == 't') || (*chg == 'h')))
+ check_topic(chan);
}
chg++;
}
-diff -burNp eggdrop1.6.19/src/mod/module.h eggdrop1.6.19.new/src/mod/module.h
---- eggdrop1.6.19/src/mod/module.h 2008-02-16 22:41:06.000000000 +0100
-+++ eggdrop1.6.19.new/src/mod/module.h 2008-09-22 12:01:11.964804368 +0200
+diff -urN eggdrop1.6.19/src/mod/module.h eggdrop1.6.19-topicprot/src/mod/module.h
+--- eggdrop1.6.19/src/mod/module.h 2008-02-16 22:41:06.000000000 +0100
++++ eggdrop1.6.19-topicprot/src/mod/module.h 2008-07-26 11:28:12.000000000 +0200
@@ -361,7 +361,7 @@
#define rem_tcl_coups ((void (*) (tcl_coups *))global[210])
#define botname ((char *)(global[211]))
@@ -229,10 +235,10 @@
#define check_tcl_chjn ((void (*) (const char *,const char *,int,char,int,const char *))global[213])
#define sanitycheck_dcc ((int (*)(char *, char *, char *, char *))global[214])
#define isowner ((int (*)(char *))global[215])
-diff -burNp eggdrop1.6.19/src/modules.c eggdrop1.6.19.new/src/modules.c
---- eggdrop1.6.19/src/modules.c 2008-02-16 22:41:04.000000000 +0100
-+++ eggdrop1.6.19.new/src/modules.c 2008-09-22 12:09:57.119525901 +0200
-@@ -461,7 +461,7 @@ Function global_table[] = {
+diff -urN eggdrop1.6.19/src/modules.c eggdrop1.6.19-topicprot/src/modules.c
+--- eggdrop1.6.19/src/modules.c 2008-02-16 22:41:04.000000000 +0100
++++ eggdrop1.6.19-topicprot/src/modules.c 2008-07-26 11:28:13.000000000 +0200
+@@ -461,7 +461,7 @@
(Function) rem_tcl_coups,
(Function) botname,
/* 212 - 215 */
@@ -241,9 +247,9 @@
(Function) check_tcl_chjn,
(Function) sanitycheck_dcc,
(Function) isowner,
-diff -burNp eggdrop1.6.19/src/patch.h eggdrop1.6.19.new/src/patch.h
---- eggdrop1.6.19/src/patch.h 2008-04-19 06:21:20.000000000 +0200
-+++ eggdrop1.6.19.new/src/patch.h 2008-09-22 12:11:00.141439071 +0200
+diff -urN eggdrop1.6.19/src/patch.h eggdrop1.6.19-topicprot/src/patch.h
+--- eggdrop1.6.19/src/patch.h 2008-04-19 06:21:20.000000000 +0200
++++ eggdrop1.6.19-topicprot/src/patch.h 2008-07-26 11:28:13.000000000 +0200
@@ -36,7 +36,7 @@
*
*
@@ -253,14 +259,15 @@
/*
*
*
-diff -burNp eggdrop1.6.19/src/proto.h eggdrop1.6.19.new/src/proto.h
---- eggdrop1.6.19/src/proto.h 2008-02-16 22:41:04.000000000 +0100
-+++ eggdrop1.6.19.new/src/proto.h 2008-09-22 12:12:19.684612158 +0200
-@@ -114,6 +114,7 @@ void check_timers();
+diff -urN eggdrop1.6.19/src/proto.h eggdrop1.6.19-topicprot/src/proto.h
+--- eggdrop1.6.19/src/proto.h 2008-02-16 22:41:04.000000000 +0100
++++ eggdrop1.6.19-topicprot/src/proto.h 2008-07-26 21:52:01.000000000 +0200
+@@ -114,6 +114,7 @@
void set_chanlist(const char *host, struct userrec *rec);
void clear_chanlist(void);
void clear_chanlist_member(const char *nick);
+void check_topic(struct chanset_t *);
-
+
/* cmds.c */
int check_dcc_attrs(struct userrec *, int);
+
================================================================
---- CVS-web:
http://cvs.pld-linux.org/packages/eggdrop/eggdrop-topicprot.patch?r1=1.5&r2=1.6
More information about the pld-cvs-commit
mailing list