mIRC Home    About    Download    Register    News    Help

Print Thread
#153040 10/07/06 09:29 AM
Joined: Feb 2005
Posts: 342
R
Rand Offline OP
Fjord artisan
OP Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
This may be intentional but I'm not entirely sure, seems more like an odd bug to me though.

/auser ABC Rand
/auser DEF *!*@*

on DEF:join:#:{ echo -sg Someone who matches DEF has joined # }

This will refuse to work if a user named "Rand" joins, even though DEF is set for all nicks/addresses. >.>

Now, I know there is optional ways to do this, like using $ulist to check to see if there is a match in DEF, or use hash tables to hold the addresses, and then do whatever, but these aren't very optimal ways to do it.

The reason I'm asking is cause I'd prefer if the scripts I write would not interfere with someone elses user groups. While this isn't entirely an issue for me specifically, it may be an issue to those who wish to use my scripts, if they have and use their own named user groups.

#153041 10/07/06 10:26 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
I'm not sure about your report, as I've never encountered it yet, but that may be luck, the way I script or a bit of both.

If I want a command to be available to everyone, I use a wildcard in the user level, rather than setting a specific user level and then wildcarding that level.

An option that might work better for you, and that I don't see in your list of options, is something like
Code:
on *:join:#:{ $iif(def isin $ulevel,echo -sg $nick who matches level $v1 has joined $chan) }  


While I agree that, in theory, your original way of doing it should work, your report states that it does not (current intermittent troubles staying connected to IRC networks prevent me from testing your report at this time)

#153042 11/07/06 12:53 AM
Joined: Feb 2005
Posts: 342
R
Rand Offline OP
Fjord artisan
OP Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
You miss the point.

I could have two similar wildcarded user groups, I only discovered this because I was writing a script that used user groups for someone else, and it didn't want to trigger, so I had to look at the addresses, at which point I realized that since two were for my address, only one of them would trigger.

ABC:one!two@*.four.com
DEF:*!*@*.four.com

*** Join: blah (seven@noobs.four.com)

on DEF:join:#:{}
will not trigger.

As I mentioned in my previous post, I already know I can use $ulist or hash tables, in case you missed it, I'll quote it:

Quote:
Now, I know there is optional ways to do this, like using $ulist to check to see if there is a match in DEF, or use hash tables to hold the addresses, and then do whatever, but these aren't very optimal ways to do it.


In other words, it doesn't matter how I code the user groups, if someone uses my scripts (that make use of User Groups), if the person is using: on SOMETHING:join:#:{} it runs a risk of not triggering because of my user groups.

Again, I know ways around it, but this only applies for -me- the creator of the script. It doesn't apply to another person who uses user groups who wants to use my script as well.


Link Copied to Clipboard