mIRC Homepage
Posted By: ST3V3 Listing Sockmarks - 17/05/04 04:49 PM
I was wondering if it is possible to list all sockmarks assigned to sockets which start in test. For example test123, test321 etc... If so how?
Thanks.
Posted By: Cobra Re: Listing Sockmarks - 17/05/04 07:44 PM
Code:
sockmark_list {
  ; * usage: /sockmark_list socknamematch
  ; * example: /sockmark_list test*
  var %sock.ctr = 0, %sock.tot = $sock($1,0)
  if (%sock.tot >= 1) { echo -ca info2 * Listing Matching Sockets $+(1-,%sock.tot) }
  while (%sock.ctr < %sock.tot) {
    inc %sock.ctr | var %sock = $sock($1,%sock.ctr)
    echo -ac info2 * - %sock.ctr SockName: %sock SockMark: $sock(%sock).mark
  }
  echo -ac info2 * SockMark_List End
}

loop though all matching sockets ( $sock(*matchtext*,N) )
and echo its $sock().mark

or display it however you wish

i didnt test the above code, but by looking at it i see no reason why it shouldnt work

to do what you asked simply use this alias and type /sockmark_list test*


hope this was helpful.

Cobra^
Posted By: ST3V3 Re: Listing Sockmarks - 18/05/04 02:59 PM
Thanks, it worked. It was very helpful. smile
© mIRC Discussion Forums