Skip to content
MSN

Connection help needed

A TG007 community discussion started by Spike1506.

Discussion 4 posts
Page 1 of 1
Open
Topic #3621 · 4 published posts · 414 views

Ok i have a problem (yeah i fex the typos in my script)

i cant join with this connection

 

alias debug {
 if (!@window(@debug)) {
   window -n @debug
 }
 echo @debug $sockname $+ $1-
}

alias pass {
 sockwrite -tn $hget(sensiva,$chan) mode $me +h $$?="Key?"
}

alias connect {
 if (!$hget(sensiva)) {
   hmake Sensiva 100
 }
 sockopen normal.lookup 207.68.167.253 6667
}

on 1:sockopen:normal.lookup:{
 .timerkeeplookup 0 10 if ($sock( $+ $sockname $+ )) sockwrite -n $sockname Version
 set %port $rand(1111,9999)
 while (!$portfree(%port)) {
   set %port $rand(1111,9999)
 }
 window -hpk0 @Lookup
 set %s $dll($shortfn($mircdir/connection/nHTMLn_2.92.dll),attach,$window(@Lookup).hwnd)
 set %s $dll($shortfn($mircdir/connection/nHTMLn_2.92.dll),navigate,about:<OBJECT ID="ChatFrame" CLASSID="CLSID:ECCDBA05-B58F-4509-AE26-CF47B2FFC3FE"><PARAM NAME="NickName" VALUE="JD"><PARAM NAME="Server" VALUE="207.68.167.253: $+ %port $+ "></OBJECT>)
 socklisten normallookup %port
}

on 1:normallookup:{
 sockaccept ocxlookup
 sockclose $sockname
}

on 1:sockread:ocxlookup:{
 set %buffer
 sockread %buffer
 tokenize 32 %buffer
 debug $1- 
 set %buffer = $replace(%buffer,gatekeeper,GateKeeperPassport)
 if ($1 == IRCVERS) {
   sockwrite -n normal.lookup IRCVERS IRC8 MSN-ADMIN!9.02.0309.2602
 }
 if ($1 == AUTH) {
   sockwrite -n normal.lookup %buffer
 }
 if ($1 == NICK) {
   sockclose $sockname
   close -@ @Lookup
 }
}

on 1:sockread:normal.lookup:{
 set %buffer
 sockread %buffer
 tokenize 32 %buffer
 debug $1-
 if ($1 == AUTH) {
   if ($3 $5 == * 0) {
     connecting
     set %gate $4
     echo -at You are now logged in Anonymously with the GateKeeperPassport: %gate
   }
   if ($4 != :ok) {
     sockwrite -n ocxlookup $1-
   }
   else {
     sockwrite -n $sockname AUTH GateKeeperPassport S : $+ $base($len(%ticket,10,16,8) $+ %ticket $+ $base($len(%profile),10,16,8) $+ profile $+ $lf $+ PROP $ SUBSCRIBERINFO : $+ %subinfo
   }
 }
 elseif ($2 == 908) {
   echo -st Subscriberinfo is out of date, please update your passport!
 }
 elseif ($2 == 910) {
   sockclose ocxlookup
   sockclose $sockname
   close -@ @Lookup
   echo -st Cookies are out of date, please update your passport!
 }
 elseif ($2 == 702) {
   echo $color(info) -at $hget(sensiva,chan) doesnt exist!
 }
 elseif ($2 == 613) {
   echo $color(info) -at $hget(sensiva,chan) Now joining..!
   set %sockname chan. $+ $rand(A,Z) $+ $rand(A,Z) $+ $rand(A,Z) $+ $rand(A,Z)
   sockopen %sockname $right($4,-1) $5
   sockmark %sockname $right($4,-1)
   hadd sensiva $hget(sensiva,chan) %sockname
 }
}

on 1:sockopen:chan*:{
 sockwrite -n $sockname NICK $me
 set %port $rand(1111,9999)
 while (!$portfree(%port)) {
   set %port $rand(1111,9999)
 }
 window -hpk0 @ $+ $sockname
 set %s $dll($shortfn($mircdir/connection/nHTMLn_2.92.dll),attach,$window(@ $+ $sockname).hwnd)
 set %s $dll($shortfn($mircdir/connection/nHTMLn_2.92.dll),navigate,about:<OBJECT ID="ChatFrame" CLASSID="CLSID:ECCDBA05-B58F-4509-AE26-CF47B2FFC3FE"><PARAM NAME="NickName" VALUE="JD"><PARAM NAME="Server" VALUE=" $+ $sock($sockname).mark $+ : $+ %port $+ "></OBJECT>)
 socklisten chanocx. $+ $right($sockname,4) %port
 sockmark $sockname $hget(sensiva,chan)
}

on 1:socklisten:chanocx.*:{
 sockaccept ocx. $+ $right($sockname,4)
 sockclose $sockname
}

on 1:sockread:ocx.*:{
 set %buffer
 sockread %buffer
 tokenize 32 %buffer
 debug $1-
 set %sockvar $right($sockname,4)
 set %buffer $replace(%buffer,gatekeeper,GateKeeperPassport)
 if ($1 == IRCVERS {
   sockwrite -n chan. $+ $right($sockname,4) IRCVERS IRC8 MSN-Admin!9.02.0309.2602
 }
 if ($1 == AUTH) {
   sockwrite -n chan. $+ $right($sockname,4) %buffer
 }
 if ($1 == NICK {
   sockclose $sockname 
   close -@ @chan. $+ %sockvar
 }
}

on 1:sockread:chan*:
set %buffer
sockread %buffer
tokenize 32 %buffer
debug $1-
if ($1 == AUTH) {
 if ($4 != :ok) {
   sockwrite -n ocx. $+ $right($sockname,4) $1-
   return
 }
 elseif ($4 == :ok {
   sockwrite -n $sockname AUTH GateKeeperPassport S : $+ $base9$len(%ticket),10,16,8) $+ %ticket $+ $base($len(%profile),10,16,8) $+ %profile $+ $lf $+ USER $me $me $me : 7Sensiva V1.0 $+ $lf $+ PROP $ SUBSCRIBERINFO : $+ %subinfo $+ $lf $+ join $sock($sockname).mark 12345
   return
 }
}
elseif ($2 == 535) {
 .var %i = 5, %n
 while (%i < $numtok($1-,32)) {
   inc %i
   .var %n = %n $gettok($gettok($1-,%i,32),-1,44) 
 }
 sockwrite -n mirc $1-5 : $+ %n
 return
}
elseif ($2 == 908) {
 echo -st Subscriber info is out of date, please update your passport!
}
elseif ($2 isin 001 002 003 004 251 252 253 254 255 265 266 422) {
 return
}
if ($2 == 910) {
 sockclose ocx. $+ $right($sockname,4) 
 close -@ @ $+ $sockname
 echo -st Subscriber info is out of date, please update your passport!
 sockclose $sockname  
}
elseif ($2 == join) {
 hadd sensiva $right($4,-1) $sockname
 sockwrite -n mirc $1-2 $4
 if ($gettok($3,4,44)) {
   sockwrite -n mirc :ChanServ MODE $remove($4,:) + $+ $replace($gettok($3,4,44),.,q,@,o,+,v) $remove($gettok($1,1,33),:)
 }
 elseif ($2 == PRIVMSG) { $iif($left($4,3 == : S,sockwrite -n mirc $1-3 : $+ $left($6-,-1),sockwrite -n mirc $1-)
   return
 }
 else sockwrite -n mirc $1-
}

alias connecting {
 set %port $rand(1111,9999)
 while (!$portfree(%port)) {
   set %port $rand(1111,9999)
 }
 socklisten pm %port
 server localhost %port
}

on 1:socklisten:pm:{
 sockaccept Mirc
 sockclose $sockname
 sockwrite -n mirc :Sensiva 001 $me : $+ Welcome to Sensiva V1.0 , $me
}

on 1:sockread:Mirc:{
 set %buffer
 sockread %buffer
 tokenize 32 %buffer
 debug $1-
 if ($1 == Join) {
   if ($sock($hget(sensiva,$2))) {
     sockwrite -n $ifmatch $10
   }
   else {
     sockwrite -n normal.lookup FINDS $2
     hadd sensiva chan $2
   }
 }
 elseif ($sock($hget(sensiva,$comchan($2,1)))) {
   sockwrite -n $ifmatch $1-
 }
 elseif ($sock(chan*,0)) {
   sockwrite -n chan* $1-
   halt
 }
}

 

because i get this:

* /sockwrite: 'normal.lookup' no such socket (line 203, sensiva.mrc)

 

(type /connecting to connect first)

Edited May 23, 2005 5:34 PM by Spike1506

last time i checked normallookup wasn't an event

by the looks of it that should be socklisten

"the important thing was, that i had an onion on my belt, which was the style at the time"

last time i checked normallookup wasn't an event

by the looks of it that should be socklisten

how do you mean?

change it to on 1:socklisten:normallookup:{

"the important thing was, that i had an onion on my belt, which was the style at the time"