mIRC Home    About    Download    Register    News    Help

Print Thread
#223645 31/07/10 05:35 AM
Joined: Jul 2006
Posts: 4,020
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,020
With UDP socket, this two proprieties now return $null on 7.1

Code:
on *:udpread:test_udp:{
  sockread -fn 4096 &a
  tokenize 32 $bvar(&a,1,4096).text
  echo -s - $sockname - $sockerr
  echo -s - $sock($sockname).saddr - $sock($sockname).sport
  if ($1 == bug) echo -s hi
  sockclose test_udp*
}

alias test_udp {
  sockudp -k test_udp $1 127.0.0.1 $1
  sockudp -k test_udp1 127.0.0.1 $1 bug
}
/test_udp N where N is any valid port, works perfectly fine on 6.35, on 7.1 $sock().saddr and $sock().sport are $null and it's not working for any valid port

Last edited by Wims; 31/07/10 08:28 AM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Apr 2010
Posts: 964
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 964
XP 972d762e7e0ce8540400eebaaccd0ee0 4 0 0

Confirmed

Joined: Dec 2002
Posts: 3,842
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 3,842
Thanks, this has been fixed for the next version.

Joined: Jul 2006
Posts: 4,020
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,020
Thanks for the fix, unfortunatly there is now a new problem.

Code:
on *:udpread:test_udp1:echo -a here.
on *:udpread:test_udp:{
  sockread -fn 4096 &a
  tokenize 32 $bvar(&a,1,4096).text
  echo -s - $sockname - $sockerr
  echo -s - $sock($sockname).saddr - $sock($sockname).sport
  if ($1 == bug) {
    echo -a hi
    sockudp -k test_udp $sock($sockname).saddr $sock($sockname).sport bug1
  }
  else echo -a hi ?
  .timer 1 1 sockclose test_udp*
}

alias test_udp {
  sockudp -k test_udp $1 127.0.0.1 $1
  sockudp -k test_udp1 127.0.0.1 $1 bug
}
when sending back something with " sockudp -k test_udp $sock($sockname).saddr $sock($sockname).sport bug1", the same event is triggered (test_udp) instead of test_udp1, work fine with 6.35


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2002
Posts: 3,842
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 3,842
Thanks this has been fixed for the next version.


Link Copied to Clipboard