mIRC Home    About    Download    Register    News    Help

Topic Options
#264666 - 29/12/18 02:12 PM Help please with a catcher logging script
Orobas Offline
Pikka bird

Registered: 13/10/14
Posts: 19
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


Edited by Orobas (29/12/18 02:14 PM)
Edit Reason: forgot some info

Top
#264841 - 16/01/19 06:05 PM Re: Help please with a catcher logging script [Re: Orobas]
fossa Offline
Self-satisified door

Registered: 16/01/19
Posts: 4
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.

Top
#264862 - 18/01/19 06:54 PM Re: Help please with a catcher logging script [Re: fossa]
Orobas Offline
Pikka bird

Registered: 13/10/14
Posts: 19
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

Top
#264863 - 18/01/19 07:19 PM Re: Help please with a catcher logging script [Re: Orobas]
maroon Offline
Hoopy frood

Registered: 12/01/04
Posts: 1108
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 ^

Top