Jump to content

Custom Theme


S3T

Recommended Posts

for:

raw 332:*:{ echo -a The topic of this channel is: $2- }

get:

The topic of this channel is: #Norwich Room meet on 20th july 8-00 pm in Lloyds see devilcat82 :)

for:

raw 332:*:{ echo -a The topic of this channel is: $1- }

get:

The topic of this channel is: Pioneer86#Norwich Room meet on 20th july 8-00 pm in Lloyds see devilcat82 :)

 

( pioneer86 ) is my nick.. #Norwich is the channel im in..

 

--------------

 

Fixed..

it was $3-

 

thanks you

 

 

Edited by S3T
Link to comment
Share on other sites

Haltdef ALWAYS goes at the end of an input or text code. As you can see from mine, it does a few things. It checks to see if the wildcard for / is there, which enables you to do two // for force entering commands into mIRC. It also sets a variable(%p) that checks for the users status (Owner, Host, Voice, Nonvoice) and sets it as a prefix for the actual echo. I find it easier to do that way then to keep doing ifs, elseifs to check for owner/host/etc status.

 

I don't know where you read that, but it doesn't matter where /haltdef goes as it doesn't halt anything like /return or /halt does.

Link to comment
Share on other sites

Guest X-Fusion

Ok, so, I'm a bit confused on what your saying. If I had a code

on ^*:TEXT:*:#:[ 
tokenize 32 $vstrip($1-)
echo $chan $nick : $1-
haltdef
}

and I wanted to halt incoming text, I could put it between tokenize and echo? The way I was always taught is that anything your trying to halt or return, it should go to the end of that string of code. Then again, I'm sure me and you were both taught different ways, which makes scripting unique.

Link to comment
Share on other sites

Ok, so, I'm a bit confused on what your saying. If I had a code

on ^*:TEXT:*:#:[ 
tokenize 32 $vstrip($1-)
echo $chan $nick : $1-
haltdef
}

and I wanted to halt incoming text, I could put it between tokenize and echo? The way I was always taught is that anything your trying to halt or return, it should go to the end of that string of code. Then again, I'm sure me and you were both taught different ways, which makes scripting unique.

 

Yeah, I was taught the right way :P

 

/halt will stop the current scope and also all calling scopes. So if you did this:

 

alias a { b | c }
alias b { halt }
alias c { echo -s b }

 

Then call /a, /c will never be called because /b uses /halt, which not only halts /b, but also /a (because /a is what called /b).

 

/return will only stop the current scope:

 

alias a { b | c }
alias b { return }
alias c { echo -s b }

 

In this, /c will be called, because the /return in /b only stops /b, not /a too, so processing can continue and /c will be called.

 

/haltdef is completely different, and doesn't do anything even anywhere near similar to what /halt or /return do. In fact, the only similarity it has with /halt is the name.

 

You can put /haltdef anywhere you like. Add this to remote:

 

on *:sockopen:google:{ haltdef | echo -s * This still triggers }

 

Now type:

 

/sockopen google google.com 80

 

You'll see a message in the status window, which shows that /haltdef did not halt processing in that scope.

Link to comment
Share on other sites

s3t, he's not a smartar**, he's just explaining the difference. When your coding it's good to know what's what, as it allows you to use the programming language as it was written, and not just use any random code, which might do the job, but wasn't intended for that particular task.

Link to comment
Share on other sites

Guest X-Fusion

Yea, I don't think hes a smartass. hixxy is a smart guy. Learning different ways to code things can save you alot of hassle down the road.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...