mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2014
Posts: 54
O
Orobas Offline OP
Babel fish
OP Offline
Babel fish
O
Joined: Oct 2014
Posts: 54
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

Last edited by Orobas; 29/12/18 02:14 PM. Reason: forgot some info
Joined: Jan 2019
Posts: 4
F
Self-satisified door
Offline
Self-satisified door
F
Joined: Jan 2019
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.

Joined: Oct 2014
Posts: 54
O
Orobas Offline OP
Babel fish
OP Offline
Babel fish
O
Joined: Oct 2014
Posts: 54
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

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
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 ^


Link Copied to Clipboard