|
Joined: Nov 2003
Posts: 81
Babel fish
|
OP
Babel fish
Joined: Nov 2003
Posts: 81 |
Hi, I'm coding a mirc script... Anyone knows how to save users of a channel on a file .txt? Thanks for help.
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,138 |
alias savenicks {
var %i = 1
while ( $nick(#,%i) ) {
write nicks.txt $ifmatch
inc %i
}
}
|
|
|
|
Joined: Nov 2003
Posts: 81
Babel fish
|
OP
Babel fish
Joined: Nov 2003
Posts: 81 |
sorry, but I'm at beginning... how to recall this "alias"?
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,138 |
Put it in remotes and type /savenicks in a channel, then open nicks.txt from your mIRC directory.
|
|
|
|
Joined: Oct 2003
Posts: 50
Babel fish
|
Babel fish
Joined: Oct 2003
Posts: 50 |
go to Tools -> Scripts Editor and put it in Remotes, or remove the word "alias" in the first line and put in in Aliases.
|
|
|
|
Joined: Nov 2003
Posts: 81
Babel fish
|
OP
Babel fish
Joined: Nov 2003
Posts: 81 |
Thanks, it works! but is it possible to do this every time I enter the channel, without write the command "/savenicks"?
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
use a trigger when you join a channel: on $me:JOIN:#:{ savenick } in your remote section..
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Nov 2003
Posts: 81
Babel fish
|
OP
Babel fish
Joined: Nov 2003
Posts: 81 |
sorry, but I don't understand... how to do this trigger?
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
Add this in your remote section.. ALT + R in your mirc..
on $me:JOIN:#:{ savenick }
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,138 |
That doesn't work.
on me:*:JOIN:#:{ savenicks }
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,138 |
No. Try it. It doesn't work with a $, it does without.
|
|
|
|
Joined: Nov 2003
Posts: 81
Babel fish
|
OP
Babel fish
Joined: Nov 2003
Posts: 81 |
mmm it doesn't work... but the command "savenicks" must be placed in remote.ini or aliases.ini?
|
|
|
|
Joined: Nov 2003
Posts: 81
Babel fish
|
OP
Babel fish
Joined: Nov 2003
Posts: 81 |
No, it doesn't works with... on me:*:JOIN:#:{ savenicks } it save only my name...
Last edited by FMJ; 16/11/03 04:19 PM.
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,138 |
I know why it doesn't work, it is because on JOIN the names list hasn't been recieved yet.. on me:*:JOIN:#:{
set %join $+ # 1
}
raw 366:*:{
if ( $eval(% $+ join $+ $2,2) ) {
savenicks
unset %join $+ $2
}
} It all goes in remotes.
|
|
|
|
Joined: Nov 2003
Posts: 81
Babel fish
|
OP
Babel fish
Joined: Nov 2003
Posts: 81 |
and if I would do enter the script in a list of channels saved in a file .txt? Exist a FOR cicle? How can I do?
|
|
|
|
Joined: Nov 2003
Posts: 81
Babel fish
|
OP
Babel fish
Joined: Nov 2003
Posts: 81 |
it doesn't works...
on me:*:JOIN:#:{
set %join $+ # 1
}
raw 366:*:{
if ( $eval(% $+ join $+ $2,2) ) {
savenicks unset %join $+ $2
}
}
Last edited by FMJ; 16/11/03 04:03 PM.
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,138 |
You missed a carriage return after savenicks.
|
|
|
|
Joined: Nov 2003
Posts: 81
Babel fish
|
OP
Babel fish
Joined: Nov 2003
Posts: 81 |
in the text I put, but doesn't work too
|
|
|
|
Joined: Nov 2003
Posts: 81
Babel fish
|
OP
Babel fish
Joined: Nov 2003
Posts: 81 |
is not possible to make a pause before to execute command?
|
|
|
|
|