mIRC Home    About    Download    Register    News    Help

Print Thread
#271493 31/03/23 12:08 AM
Joined: Apr 2005
Posts: 111
X
Vogon poet
OP Offline
Vogon poet
X
Joined: Apr 2005
Posts: 111
alias gl {
.gline $1 1d $2-
write c:\back\mirc\glines.qbm $1 $2- $date $time
}

alias lg {
var %dir2 c:\back\mirc\glines.qbm
var %i = 1
while (%i <= 35) {
inc %i
echo 2 %i $read(%dir2,%i)
}
}

i dont know what is wrong

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
I don't know what you're trying to do. And I don't know what RED thing you are having a problem with?
I see that your LG alias increases %i to 2 before showing lines, so this will not show line #1
GLINE is not a built-in command, so I can only guess this is an alias you did not include.
and your first alias is not calling LG, so I don't know what is supposed to be calling either of your 2 aliases?
You probably also want to use the 'nt' switches like $read(%dir2,nt,%i)

Joined: Jan 2012
Posts: 301
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 301
Try to use this code:
Code
alias gl {
  if ($0 < 3) { echo -a Correct syntax:04 /gl <user@host> <N[m,h,d]> <reason> | halt }
  var %dir $+($mircdir,glines.txt)
  var %parms $1 $2 $3-
  var %date $+($chr(40),$date,$chr(32),$time,$chr(41))
  .gline %parms 
  .write -i %dir %parms %date
  echo -a Saved:03 %parms -> %dir
}
alias lg {
  var %dir $+($mircdir,glines.txt)
  if (!$lines(%dir)) { echo -a List with glines is empty. | halt }
  var %i 1 | while (%i <= 35) {
    if (%i > $lines(%dir)) break
    if (%i == 1) echo $str(-,50)
    echo 12 %i : $read(%dir,%i)
    inc %i
  }
}


🌐 http://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples
Joined: Apr 2005
Posts: 111
X
Vogon poet
OP Offline
Vogon poet
X
Joined: Apr 2005
Posts: 111
thanx for the answer


Link Copied to Clipboard