|
Joined: Jan 2005
Posts: 55
Babel fish
|
OP
Babel fish
Joined: Jan 2005
Posts: 55 |
hello
I have these 2 things in my remote:
on 1:join:#:{ if ($nick !isop $chan) { .timermsg1 1 3 /msg $nick welcome! } }
alias m { var %a $nopnick($chan,0) | while %a { .timer 1 $calc(%a * 9) .msg $nopnick($chan,%a) $1- | dec %a } }
can you tell me what do I have to do in order to exclude:
1.all the nicks (some components in my ignore list are ip addresses, identds etc etc) that are in my ignore list
2.all operators and\or voices in the channels I am
from these scripts?
thank you!
Last edited by rtg; 15/12/05 06:19 PM.
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
on *:join:#:{
if ($nick isreg $chan) || (!$ignore($nick) && !$ignore($address($nick,3))) {
.timermsg1 1 3 /msg $nick welcome!
}
}
alias m {
var %a = $nick($chan,0,r)
while %a {
var %nick = $nick($chan,%a,r)
if !$ignore(%nick) && !$ignore($address(%nick,3)) {
.timer 1 $calc(%a * 9) .msg %nick $1-
}
dec %a
}
}
I extended your scripts to multiple lines simply because I find it easier to work with scripts that don't use pipes. You obviously know how pipes work, so I'll leave it up to you if you want to use the codes as I've given them to you, or if you want to rewrite them using pipes. I don't have anyone on my ignore list, so I'm unable to test these, but I think they should work.
|
|
|
|
Joined: Jan 2005
Posts: 55
Babel fish
|
OP
Babel fish
Joined: Jan 2005
Posts: 55 |
thank you so much for your help
can anyone tell me how to make them in one simple line each script?
thanks
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
Why would you want all code on one line? It offers no benefits, only disadvantages. - It's not shorter, as there are the same amount of bytes, just on one single line.
- It's much harder to follow the code.
- It's harder to make amendments to it, because you have no sense of logical grouping when the code is on one line.
- When there is an error, there will usually be a line number that tells you where the error is, if you have all code on one line, then you don't really know much more, but if you put all code on seperate lines, you know immediately where the error is.
- People will be less inclined to help you with your code, because of the above reasons (it's unreadable)
Oh, and did I mention it looks absolutely horrible? The code is fine like you have it now, don't let anyone trick you into thinking having all code in one line is better/more leet, it's not.
Gone.
|
|
|
|
Joined: Jan 2005
Posts: 55
Babel fish
|
OP
Babel fish
Joined: Jan 2005
Posts: 55 |
ok but when I copy and paste it, it doesnt retain the appropriate form and I dont know where to insert blank or paragraph sign
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
That's because of a forum bug.
Copy the code, in mIRC type: //run wordpad, in Wordpad paste the code, then copy it from there to your scripts editor.
Alternatively, click on the relevant post's "Quote" link, and copy the code from there.
Gone.
|
|
|
|
Joined: Jan 2005
Posts: 55
Babel fish
|
OP
Babel fish
Joined: Jan 2005
Posts: 55 |
on *:join:#:{
if ($nick isreg $chan) || (!$ignore($nick) && !$ignore($address($nick,3))) {
.timermsg1 1 3 /msg $nick welcome!
}
}
alias m {
var %a = $nick($chan,0,r)
while %a {
var %nick = $nick($chan,%a,r)
if !$ignore(%nick) && !$ignore($address(%nick,3)) {
.timer 1 $calc(%a * 9) .msg %nick $1-
}
dec %a
}
}
unfortunatelly neither of these work
|
|
|
|
Joined: Jan 2005
Posts: 55
Babel fish
|
OP
Babel fish
Joined: Jan 2005
Posts: 55 |
|
|
|
|
Joined: Mar 2004
Posts: 21
Ameglian cow
|
Ameglian cow
Joined: Mar 2004
Posts: 21 |
Hello, Some errors, i think. First, when somebody just joined a room, he has no mode. It's just some seconds after, when a service recognized him that a mode can be given to him.. or not. On JOIN, we are always regular users. So, the better solution, i think, is to launch the timer with the needed check, so that it can only be performed 3 secondes later (when mode is probably given). To check the ignore list, (v1 isignore v2) et $ignore() beiing not efficient for all type of mask (if i remember well), we can create a separated alias, here called IsIgnore, useful in other stuff, if you need it.
; ! prefix means that the event is not triggered when YOU join.
On !*:Join:#:.timer 1 3 if ( $nick isreg $chan ) && (!$IsIgnore( $nick )) msg $nick welcome !
;
;
;
; This alias just works if the nick has already performed an action detected by your mIRC..
; ... (join, text, action, private msg, mode...), unless you perform a /who $chan when...
; ...you join a room (in this case, this alias always works)
;
; Use: $IsIgnore(<nick>)
IsIgnore {
var %x $address($1,5)
var %i $ignore(0)
while ($ignore(%i) !isnum) {
if ($v1 iswm %x) return $true
dec %i
}
return $false
}
;
;
;
, you second code:
; Use: m <message>
alias m {
if (!$1) { echo -a * /m <message> | return }
var %a = $nick($chan,0,r)
while %a {
var %nick = $nick($chan,%a,r)
if (!$IsIgnore(%nick)) {
; check if the user still is on the channel.
; you will receive the message too. A good mean to know if that works.
.timer 1 $calc(%a * 9) if ( %nick ison $chan ) .msg $!v1 $1-
}
dec %a
}
}
I hope that works (no means to try, so consider this code like an idea)
-Be cool with my English- irc.EpiKnet.org:#scripts
|
|
|
|
|