mIRC Homepage

Help please with a catcher logging script

Posted By: Orobas

Help please with a catcher logging script - 29/12/18 02:12 PM

Original script from an old unrealircd 3.2 series..

Quote:
on $*:text:/(?i)logusers\72\s(\S+).*\100((\S+)\.){2}\w{3}/S:#services:{
if $regml(2) = mibbit. {
msg #opers $regml(1) has connected from a mibbit connection.
}
}


We now have a multi-server setup on unrealircd 4 series and the output in #services is <time><ChanServ> USERS:name!ident@hostmask

I'm trying to get the bot to now notifty on any mibbit connects initially for seeing how many we get during a day etc.. and then changing to Tor connects once the script works

I am currently only getting messages when mibbot_stats connects and not from any other mibbit users.

I have edited the top line of script to this so far

Quote:
on $*:text:/(?i)USERS\72\s(\S+).*\100((\S+)\.){2}\w{3}/S:#services:{


but i dont know where it's wrong
Posted By: fossa

Re: Help please with a catcher logging script - 16/01/19 06:05 PM

Maybe you can use something like this if I understand your question clear:
Code:
on *:text:USERS*:#services:{
  if ($regex($address,/(mibbit)/i)) {
    .msg #opers $removecs($1,USERS:) has connected from a mibbit connection.
  }
}

Maybe a start for you.
Posted By: Orobas

Re: Help please with a catcher logging script - 18/01/19 06:54 PM

Hi fossa

many thanks for the reply but i ended up calling from snotice. apologies for being late on my reply but i've had a bit of conenction issue

Quote:
on ^*:snotice:*:{
if (client connecting isin $1-) {
if (mibbit isin $5) {
msg #Cheirops 4 Hello 3 $4 4 it's $date and you are using 3 Mibbit
haltdef
}
if (uid isin $5) {
msg #Cheirops 4 Hello 10 $4 4 it's $date and you are using 10 (Free) IRC Cloud
haltdef
}
if (sid isin $5) {
msg #Cheirops 4 Hello 14 $4 4 it's $date and you are using 14 (Paid) IRC Cloud
haltdef
}
if (kiwibot isin $5) {
msg #Cheirops 4 Hello 3 $4 4 This is an indexing bot
haltdef
}
if (iCrawl isin $5) {
msg #Cheirops 4 Hello 3 $4 4 This is an indexing bot
haltdef
}
if (tunix isin $5) {
msg #Cheirops 4 Hello 3 $4 4 This is an indexing bot
haltdef
}
}
}


if this can be simplified it'd be ideal but for now this is bang on smile
Posted By: maroon

Re: Help please with a catcher logging script - 18/01/19 07:19 PM

please use the [ code] in the # icon instead of quote, as it makes reading the code easier.

Hopefully you plan to be a little more precise with your wildcards. You're checking if the string contains uid or sid, but that matches someone with identd set to guido or sidney. Assuming $5 contains nick!identd@host you should search for a regex pattern like:

Code:
//var %5 test!~uid123test | echo -a $regex(%5,!~?uid\d+)


this only matches the uid if followed by at least 1 number, and preceded by either ! or ~!
If it's just the identd@host you can anchor to the beginning of the string with by replacing the ! with ^
© 2019 mIRC Discussion Forums