mIRC Home    About    Download    Register    News    Help

Print Thread
#41842 14/08/03 10:03 PM
Joined: Feb 2003
Posts: 37
D
druiddk Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Feb 2003
Posts: 37
Hi!

I'm having some problems using $sock like i want :-/

Code:
on *:TEXT:!pre*:#:{ 
  if ($chan == #test) { var %group = test }
  if ($1 == !pre) {
    .remove prebot\pre-commands.txt
    var %open = 0
    :close-open
    inc %open
    if ($sock(pre.ums.*,%open) != $null) {
      echo -s prebot\pre-commands.txt sockwrite -n $sock([ pre. [ $+ [ %group ] [ $+ .* ] ] ],%open)
      goto close-open
    }
  }
}
 


But it just outputs "sockwrite -n", theres a socket open called "pre.test.test".

What am i doing wrong here?

#41843 14/08/03 10:17 PM
Joined: May 2003
Posts: 730
S
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
did he type it in the channel #test ?


#41844 14/08/03 10:22 PM
Joined: Feb 2003
Posts: 37
D
druiddk Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Feb 2003
Posts: 37
Yeah obviously, since it outputs the "prebot\pre-commands.txt sockwrite -n".

Im not sure how or even IF i can use the [ ] inside the $sock...

#41845 14/08/03 10:31 PM
Joined: May 2003
Posts: 730
S
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
if ($sock(pre.ums.*,%open) != $null) { ?
or maybe if ($sock($+(pre.,%group,.*),%open) != $null) { ?



#41846 14/08/03 10:41 PM
Joined: Feb 2003
Posts: 37
D
druiddk Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Feb 2003
Posts: 37
Well the if part is OK as it is, otherwise it wouldnt make any output.

However this must be broken:

Code:
echo -s prebot\pre-commands.txt sockwrite -n $sock([ pre. [ $+ [ %group ] [ $+ .* ] ] ],%open)


Im 100% sure the problem is with
Code:
$sock([ pre. [ $+ [ %group ] [ $+ .* ] ] ],%open)


I just dont have a clue whats wrong with it...

#41847 15/08/03 03:05 AM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
echo -s prebot\pre-commands.txt sockwrite -n
you make it echo -s, not actually sockwrite, put the echo on a different line..


new username: tidy_trax
#41848 15/08/03 07:05 AM
Joined: Feb 2003
Posts: 37
D
druiddk Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Feb 2003
Posts: 37
Code:
$sock(pre. [ $+ [ %group ] ] $+ .*,%open)


That works :-)


Link Copied to Clipboard