mIRC Home    About    Download    Register    News    Help

Active Threads | Unanswered Past 24 hours | Past 48 hours | Past Week | Past Month | Past Year
Scripts & Popups Jump to new posts
Re: Regex help to identify $nick SLiprockS 4 hours ago
Thank you so much maroon for your time and action. it helps to understand and clear my views. I have resolve the problem which triggering the ban. I had same variable for On nick and on join which causing the ban most of the time smirk. I sent you an private msg long back to get idea of you got some time you can give me a little suggestion

Best
14 334 Read More
Scripts & Popups Jump to new posts
Re: Regex help to identify $nick maroon Yesterday at 10:08 PM
Again, which gets to my specific question - I asked you to give me 1 nick that it matches when it shouldn't, but instead you gave me 6 nicks which do match the regex pattern, and which should match.

When I test with the nick foobar, it doesn't match.

So again, give me 1 nick that should not match, but which does match.

//var %wnick = foobar , %p1 = /[A-Za-z0-9].+(_){4,10}.+[A-Za-z0-9]/ , %p2 = /^[A-Za-z]+(_)+[A-Za-z]+(_)+[A-Za-z]+(_)+[A-Za-z]+(_).+/ , %p3 = /[A-Za-z]+\x7C+[A-Za-z]+\x7C+[A-Za-z]+\x7C+[A-Za-z].+/ | if $regex(%wnick,%p1) || $regex(%wnick,%p2) || $regex(%wnick,%p3) { echo -a .gline $nick +5d reason } | else echo -a did not match
14 334 Read More
Scripts & Popups Jump to new posts
Re: Regex help to identify $nick SLiprockS Yesterday at 10:04 PM
Dear manroon,

Problem is it also ban ordinary nick if I have all 3 regex pattern indicating
Quote
if $regex(%wnick,%p1) || $regex(%wnick,%p2) || $regex(%wnick,%p3) { .gline $nick +5d reason }

however if i just reduce the %p3 and have the script like
Quote
if $regex(%wnick,%p1) || $regex(%wnick,%p2) { .gline $nick +5d reason }
it works fine match with regex %p1 & %p2 patterns. What's wrong with my regex pattern %p3 whenever I add it my scripts start banning any nicks that join.
14 334 Read More
Scripts & Popups Jump to new posts
Re: The bot does not kick change nick in idle. Help me SLiprockS Yesterday at 09:56 PM
Hi Kendy,

I tried to code it with my little knowledge. Hope this is surve the purpose. Please test it and let me know.

Quote
#idlekicker on
on *@!:JOIN:#help: if !$timer($nick) { $+(.timer,$nick) 1 120 KickIdler $chan $nick }
on *:TEXT:*:#help: $+(.timer,$nick) 1 120 KickIdler $chan $nick
on 1:NICK: {
if ($nick isop $chan) { return }
var %nick = $newnick, %cn = $comchan(%nick,0)
while (%cn) {
if (*#help* iswm $comchan(%nick,%cn)) { $+(.timer,%nick) 1 120 KickIdler #help %nick }
dec %cn
}
}
alias KickIdler { if ($me isop $1) && ($2 isreg $1) { ban -ku120 $1-2 2 Don't hang your nick here. Come back after 2 minutes if you really need help! Thank you }
}

#idlekicker end


Thanks
1 77 Read More
Scripts & Popups Jump to new posts
Re: Regex help to identify $nick maroon Yesterday at 09:38 PM
I can confirm that each of these 6 examples does match at least 1 of your 3 regex patterns.
If there are any of these 6 examples which should not match at least 1 of these 3 regex patterns, please indicate which nick, and describe why the nick should not match any of the 3 patterns.
14 334 Read More
Scripts & Popups Jump to new posts
Re: Regex help to identify $nick SLiprockS Yesterday at 08:46 PM
Quote
Example
WE_____LOVE_YOU
HI_D_E__IF_YOU_____CAN
FInd|ME|If|You|can
I|want|move|IT_move_IT
Here|I|Go|Catch|Me
P_R_I_N_C_E

Quote

on @*:join:#channel: {
if ($nick isop $chan) || ($nick isvoice $chan) { return }
var %wnick = $nick , %p1 = /[A-Za-z0-9].+(_){4,10}.+[A-Za-z0-9]/ , %p2 = /^[A-Za-z]+(_)+[A-Za-z]+(_)+[A-Za-z]+(_)+[A-Za-z]+(_).+/ , %p3 = /[A-Za-z]+\x7C+[A-Za-z]+\x7C+[A-Za-z]+\x7C+[A-Za-z].+/
if $regex(%wnick,%p1) || $regex(%wnick,%p2) || $regex(%wnick,%p3) { .gline $nick +5d reason }
}
14 334 Read More
Feature Suggestions Jump to new posts
Re: Temporarily alter a user's channel mode FroggieDaFrog Yesterday at 06:49 PM
I messed up the example slightly, and since I can't edit the OP, here is a fixed simplified version

Code
;; received event:
;;   @user-channel-flags=ov :User!ident@addr PRIVMSG #chan :!command

on ^*:TEXT:*:#chan:{
  if (o isincs $msgtags(user-channel-flags).key) {
    spoofmode +o
  }
}

on *:TEXT:!command:#chan:{
  if ($nick isop #chan) {
    ;; this would be valid
  }
}
1 25 Read More
Scripts & Popups Jump to new posts
Re: Detect new file or folder maroon Yesterday at 06:27 PM
You've got 2 echoes going on, you're sending the count of matching folders to @new but the echo of the individual matches are going to the status window. If you want both to go to @new, then you need to send both echoes there. If you only want the matches going there, then do something like

//noop $finddir(%fdpath,*,0,1,echo @NEW New Directory(s) Detected : $1-)

Note that the depth of 0 you used behaves like depth of 1, so you're not seeing subdirs unless you either change depth to something big like 99 or just drop that 4th parm. Also note that if you're trying to copy/move folders or filenames someone creates having doublespaces would require special handling, such as addressing them using $shortfn.
2 34 Read More
Scripts & Popups Jump to new posts
Re: Regex help to identify $nick maroon Yesterday at 05:56 PM
What's an example of something I can set %wnick to, which causes the ban when it should not do so?
14 334 Read More
Scripts & Popups Jump to new posts
Re: Detect new file or folder SLiprockS Yesterday at 05:07 PM
Hi, you can try this out which may serve your purpose

Quote
alias FDD {
var %FDpath C:\Users\colt\Dropbox
/window @NEW | echo @NEW New Directory(s) Detected : $finddir(%FDpath,*.*,0,)
/window @NEW | echo @NEW New File(s) Detected : $findfile(%FDpath,*,0,1)
}


Thanks
2 34 Read More
Scripts & Popups Jump to new posts
Re: Regex help to identify $nick SLiprockS Yesterday at 04:44 PM
Hi Maroon.

Sorry that you didn't got my point what actually i'm looking for. I don't want 3 literal strings only. What I wanted to do is matching by regex as you can see in my code i have added P1 P2 P3 each of the regex is for different type of nick patterns. In the code it was working for variable p1 & p2 (example is below). Whenever i'm adding p3 it starting to trigger for all the nicks. I want it like i will add more variables like p4, p5.

Quote

Example
if $regex(%wnick,%p1) || $regex(%wnick,%p2) { .gline $nick +5d reason } working fine
if $regex(%wnick,%p1) || $regex(%wnick,%p2) || $regex(%wnick,%p3) { .gline $nick +5d reason } starting to trigger for all why is that


Appreciate if you can help me to let know in which way I can add like more regex pattern in my code.

Thanks
14 334 Read More
Scripts & Popups Jump to new posts
Detect new file or folder colt45 Yesterday at 03:19 PM
Hi, I'm hoping to write something that alert me for any new files/folders uploaded by someone onto my dropbox.

I plan to run this timer every 5 mins on mIRC startup

Code
alias FDD {
var %FDpath C:\Users\colt\Dropbox
  echo @NEW New Directory(s) Detected : $finddir(%FDpath,*.*,0,0,echo $1-)
  echo @NEW New File(s) Detected : $findfile(%FDpath,*.*,0,0,echo $1-)
}
The result isn't how I was hoping for, all I see the output was
Code
C:\Users\colt\Dropbox\Test
C:\Users\colt\Dropbox\test1.txt
C:\Users\colt\Dropbox\test2.txt
C:\Users\colt\Dropbox\test3.txt
but what I see in @NEW
Code
New Directory(s) Detected : 1
New File(s) Detected : 3
How can I get this to display them into @NEW window? So that it would show like this ...
Code
New Directory Detected : C:\Users\colt\Dropbox\Test
New File(s) Detected : C:\Users\colt\Dropbox\test1.txt
New File(s) Detected : C:\Users\colt\Dropbox\test2.txt
New File(s) Detected : C:\Users\colt\Dropbox\test3.txt


Hope someone can help me,

Thanks
2 34 Read More