mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 204
K
keeker Offline OP
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Dec 2002
Posts: 204
hi, i got a section in an ini file like this:

[#channel]
Nick_92=a
Someother_nick=o
yet_another_nick=h
lastnick=v

what i want to do is read all the nicks in [#channel] and memo them using the networks memoserv. how can i run a command on each and every nick in [#channel]?i need something like this:

Code:
alias memosend {
var %nick = <this is the part i need help on>
var %message = $1-
memoserv send %nick %message
}


keek: Scots - intr.v. keeked, keekĀ·ing, keeks
To peek; peep.
Joined: May 2003
Posts: 730
S
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
alias memosend {
var %i = 1
while (%i <= $ini(file.ini,#channel,0)) {
ms send $ini(file.ini,#channel,%i) msg
inc %i
}
}
replace file.ini with the name of your ini file

Joined: Dec 2002
Posts: 204
K
keeker Offline OP
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Dec 2002
Posts: 204
Thank you Scatman, now one little other question, if i wanted to send it to only the poeple in the file that have an "a" after the = sign, (ie Neoknight=a) and not people with o/h/v, how would i tell that?


keek: Scots - intr.v. keeked, keekĀ·ing, keeks
To peek; peep.
Joined: May 2003
Posts: 730
S
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
alias memosend {
var %i = 1
while (%i <= $ini(file.ini,#channel,0)) {
if ($readini(file.ini,#channel,$ini(file.ini,#channel,%i)) == a) {
ms send $ini(file.ini,#channel,%i) msg
}
inc %i
}
}


Link Copied to Clipboard