Skip to content
General IRCX

Custom Theme

A TG007 community discussion started by S3T.

Discussion 19 posts
Page 1 of 1
Open
Topic #8593 · 19 published posts · 4,827 views

On *:input:#: {

if (/ != $left($1,1)) {

^^ i dont understand that, if someone could help me please

so you can still use

/me ..ect.. without showing "/me" in the theme

 

if ya get me.. lol

it means

if / isnt the first character in the first word then do something that follows the {

My code does NOT have bugs. It just develops random features.

On *:input:#: {

if (/ != $left($1,1)) { echo $chan $me : $1-

}

 

say $1-

 

 

where would haltdef go?

Edited Jun 22, 2007 5:38 PM by S3T

on *:INPUT:*: {
  if (/* iswm $1) return
  else {
    privmsg $target $1-
    var %p $left($nick($chan,$me).pnick,1)
    if (%p isalnum) %p = $chr(160)
    if (#* iswm $target) echo $target [[ $+ %p $+ ]]  $+ $me : $1-
    else echo $target  $+  $me : $1-
    haltdef
  }
}

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.

ahh ty matey

how do you get a channels topic ? is it $topic? or is it a Raw?

 

 

It's raw 332 I believe.

right, and how would i use it ? maybe to ( set %topic )

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

Now, if $1- doesnt work, try $2-, because I believe the format is channel topic .. which may return #channel this is my topic. So, $2- would return just this is my topic. Hope this helps.

and that would come on when you join a channel ye?

Anytime the raw is triggered. Whether its from the join event, or whether its from a /who event.

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 Jun 22, 2007 8:52 PM by S3T

No problem, glad I could help. :)

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.

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.

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.

smartar**

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.

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.