Skip to content

Commit d97dd2d

Browse files
committed
Improve channel ads & fix search autoaccept...
... when search includes an apostrophe.
1 parent bcd03a8 commit d97dd2d

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

dlFilter.mrc

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,13 @@ dlFilter uses the following code from other people:
123123
124124
2.09 Fix error when DLF is being advertised by a channel op.
125125
Fix 2 errors reporting spam from another user to channel ops.
126+
Include web version in channel advertising and show received adverts if current version does not match
127+
Fix auto-accept of @search results where search includes an apostrophe
126128
127129
*/
128130

129131
; Increase this when you have sufficient changes to justify a release
130-
; When you want to trigger updates for existing users, change the version file.an
132+
; When you want to trigger updates for existing users, change the version file.
131133
alias -l DLF.SetVersion {
132134
%DLF.version = 2.08
133135
return %DLF.version
@@ -1293,7 +1295,7 @@ alias -l DLF.Chan.ctcpBlock {
12931295
; TODO - limit frequency of warnings about a specific user and send oNotice after a random period with cancel if reported by another DLF instance.
12941296
alias -l DLF.Chan.SpamFilter {
12951297
if ($DLF.Options.IsOp && (%DLF.opwarning.spamchan == 1) && ($me isop $chan)) {
1296-
var %msg $c(4,15,Channel spam from $nick $br($address($nick,5)) $+ : $q($1-))
1298+
var %msg $c(4,15,Channel spam from $nick $br($address($nick,5)) $+ : $qt($1-))
12971299
.notice @ $+ $chan $DLF.logo %msg
12981300
DLF.Win.Echo Filter Blocked $chan $nick %msg
12991301
}
@@ -1715,7 +1717,7 @@ alias -l DLF.Ops.AdvertChanNet {
17151717
continue
17161718
}
17171719
if (($DLF.Chan.IsDlfChan(%c,$false),$asc($comma)) && ($me isop %c)) {
1718-
var %msg $c(1,9,$DLF.logo Are the responses to your requests getting lost in the crowd? Are your @find responses spread about? If you are using mIRC as your IRC client, then download dlFilter from $u($c(2,https://github.com/DukeLupus/dlFilter/)) and make your time in %c less stressful.)
1720+
var %msg $c(1,9,$DLF.logo Are the responses to your requests getting lost in the crowd? Are your @find responses spread about? If you are using mIRC as your IRC client, then download dlFilter version %DLF.version.web from $u($c(2,https://github.com/DukeLupus/dlFilter/)) and make your time in %c less stressful.)
17191721
if (%DLF.ops.advertchan.filter == 1) {
17201722
.msg %c %msg
17211723
DLF.Win.Log Filter text %c $me %msg
@@ -1881,8 +1883,9 @@ alias -l DLF.DccSend.Request {
18811883
}
18821884

18831885
alias DLF.DccSend.FixString {
1884-
var %s = $replace($strip($1-),$tab $+ $space,$space,$tab,$null)
1885-
return $remove(%s,¬,`,¦,!,",£,$,€,%,^,&,*,$lbr,$rbr,_,-,+,=,$lcurly,$rcurly,[,],:,;,@,',~,$hashtag,|,\,<,$comma,>,.,?,/)
1886+
var %tab $tab, %space $space
1887+
var %s = $replace($strip($1-),%tab $+ %space,%space,%tab,$null,',%space)
1888+
return $remove(%s,¬,`,¦,!,",£,$,€,%,^,&,*,$lbr,$rbr,_,-,+,=,$lcurly,$rcurly,[,],:,;,@,~,$hashtag,|,\,<,$comma,>,.,?,/)
18861889
}
18871890

18881891
alias -l DLF.DccSend.GetRequest {
@@ -1891,8 +1894,8 @@ alias -l DLF.DccSend.GetRequest {
18911894
if (%req) return %req
18921895
if (*_results_for_*.txt.zip iswmcs %fn) {
18931896
var %nick $gettok(%fn,1,$asc(_)), %trig $DLF.SearchBot.TriggerFromNick($nick)
1894-
var %sbresult %nick $+ _results_for_
18951897
if ((%trig) && ($istok($nick $nick $+ Bot Search SearchBot,%nick,$asc($space)))) {
1898+
var %sbresult %nick $+ _results_for_
18961899
var %srch $right($removecs($gettok(%fn,1,$asc(.)),%sbresult),-1)
18971900
return $hfind(DLF.dccsend.requests,$+($network,|*|,%trig,|,%srch,|*),1,w).item
18981901
}
@@ -5302,7 +5305,8 @@ alias -l DLF.CreateHashTables {
53025305
inc %matches $hget(DLF.channotice.trivia,0).item
53035306

53045307
DLF.hmake DLF.chantext.dlf
5305-
DLF.hadd chantext.dlf $strip($DLF.logo) *
5308+
DLF.hadd chantext.dlf $strip($DLF.logo) * download dlFilter version %DLF.version *
5309+
DLF.hadd chantext.dlf $strip($DLF.logo) * download dlFilter from *
53065310
inc %matches $hget(DLF.chantext.dlf,0).item
53075311

53085312
DLF.hmake DLF.chantext.spam

0 commit comments

Comments
 (0)