mIRC Home    About    Download    Register    News    Help

Print Thread
#49447 14/09/03 07:14 PM
Joined: Dec 2002
Posts: 397
A
ATMA Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Dec 2002
Posts: 397
ok i got some great ideas from that script and its teaching me alot about sockets and what im trying to do is this line ":ATMA!~fixed@Matrixn3t.net PART #future" or any line like it
what i want it to do is get the nick from between :<nick>! so it and thats all with just a remove line any ideas how?

#49448 14/09/03 07:20 PM
P
pheonix
pheonix
P
$remove($gettok(:ATMA!~fixed@Matrixn3t.net,1,33),:)

#49449 14/09/03 07:21 PM
Joined: Dec 2002
Posts: 397
A
ATMA Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Dec 2002
Posts: 397
franks

#49450 14/09/03 07:22 PM
P
pheonix
pheonix
P
np smile

#49451 14/09/03 07:23 PM
Joined: Dec 2002
Posts: 397
A
ATMA Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Dec 2002
Posts: 397
err i want it to extract any nick not just that certain one so if a guy named joe walk in it and its all funky and [censored] i want it to just say joe

#49452 14/09/03 07:27 PM
P
pheonix
pheonix
P
yeah i need to know the variable you sockread into.

#49453 15/09/03 02:45 PM
Joined: Jan 2003
Posts: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
alias name {
var %addy = $$1
return $right($gettok(%addy, 1, $asc(!)), -1)
}

#49454 16/09/03 06:20 AM
Joined: Feb 2003
Posts: 806
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 806
You have a token: ":ATMA!~fixed@Matrixn3t.net PART #future".
It's ASCII number ($asc(!)) is 33. You need the 1st part the string separated by chars like it.
So, you'd have it using $gettok(:ATMA!~fixed@Matrixn3t.net PART #future, 1, 33), which returns ":ATMA".

To get rid of that ":", you can use either $remove(:ATMA,:) or $mid(:ATMA,2).
Concluding the method, you'd have $mid($gettok(:ATMA!~fixed@Matrixn3t.net PART #future,1,33),2).

Now, supposing your variable is %var, you'd use $mid($gettok(%var,1,33),2).

Or if you want it to be an alias, you'd use..
alias _nick { return $mid($gettok($1,1,33),2) }
..Then you'd use $_nick(<your line here>) everywhere.


Such a colourful-detailed reply.. I need sleep..

#49455 16/09/03 09:05 AM
Joined: Dec 2002
Posts: 1,893
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,893
Nice smile


Link Copied to Clipboard