Skip to content
General IRCd

%# Question

A TG007 community discussion started by iLia.

Discussion 15 posts
Page 1 of 1
Open
Topic #8555 · 15 published posts · 3,640 views

Daniel forgot his password (and e-mail I suspect) for TG so he asked me to post this . I can't always read his handwriting though so if something looks odd just say so and I'll clarify it with him.

 

 

 

I'll just quote what he wrote on the note for me

 

I want to post from one room to another

 

Normally that would be like this, when in channel a

 

/msg #b-Room Blah

 

 

The problem is that roomnames start with %#

 

Is there a way around this?

 

 

P.S. Plz edit the title , I really didn't know what to put.

Edited Jun 8, 2007 1:56 PM by err0r

Ειναι πολλα τα λεφτα Αρη.

 

 

 

Yes. Just use //msg %#b-Room Blah :)

pretty much what Warrior said lol

err0r: 666 + 1337 = 2003 backwards is 3002 which is how many people ozzy has banned from tg
err0r: spooky

From command line:

 

/msg %#channel

 

(note I'm only using ONE slash here).

 

From remote:

 

msg % $+ #channel

this will do it

 

/msg $chr(37) $+ $chr(35) $+ b-Room Blah

 

$chr(37) = %

$chr(35) = #

$+ = put item before and item after together as one

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

this will do it

 

/msg $chr(37) $+ $chr(35) $+ b-Room Blah

 

$chr(37) = %

$chr(35) = #

$+ = put item before and item after together as one

 

Why use $chr() when you can just use the actual characters like I did? :unsure:

Thx.

 

He wrote them all down and will try them , then comment himself.

 

And thx for editing my rather vague title.

Edited Jun 8, 2007 8:18 PM by iLia

Ειναι πολλα τα λεφτα Αρη.

 

 

 

Why use $chr() when you can just use the actual characters like I did? :unsure:

 

Because mIRC uses % for variables and so has issues sometimes using % in room names. (One of the reasons MSN OCX sucks)

 

For instance. If you called an alias named testing and wanted to include the $nick and $chan:

 

if ($nick != $me) testing $chan $nick

 

alias testing {

if ($2 ison $1) mode $1 +o $2

}

 

If the channel had %# to start with mIRC wouldn't process it and so $1 would be the $nick and there would be no $2.

 

The typical way connections handled this was to remove $chr(37) to move the info around and then when sending it to the server, add it back on.

Because mIRC uses % for variables and so has issues sometimes using % in room names. (One of the reasons MSN OCX sucks)

 

I understand all of that, but what I gave him works fine. Try typing this in mIRC:

 

//echo -a % $+ test

 

You will see "%test" in the active window. This shows that mIRC has in fact NOT evaluated the string as a variable. The same can be used for channels: % $+ #chan

 

You could also use $(%#chan,0) or $eval(%#chan,0), but whichever way you use (% $+ #chan being the shortest), there's no need to use two $chr()s

 

For instance. If you called an alias named testing and wanted to include the $nick and $chan:

If the channel had %# to start with mIRC wouldn't process it and so $1 would be the $nick and there would be no $2.

 

The typical way connections handled this was to remove $chr(37) to move the info around and then when sending it to the server, add it back on.

 

No, that is wrong.

 

alias test { echo -a $1 }

 

Now type this (exactly this) in the status window: /test %#x

 

You will see "%#x" come up. The "echo -a $1" will only evaluate $1 once, which will turn it into %#x, you would have to evaluate it again to get the value of that variable. For mIRC to do what you're saying, you would have to change the /test alias to this:

 

alias test { echo -a $eval($1,2) }

 

You have probably ran into problems with calling aliases on a timer or something which has misled you, but that is because timers evaluate everything an extra time.

hixxy knows mIRC scripting like the back of their hand ;P

err0r: 666 + 1337 = 2003 backwards is 3002 which is how many people ozzy has banned from tg
err0r: spooky

lol, yea, he's been around for donks :P

 

But hixxy is right. I think it's just more for personal preference, but either way, all the codes provided will work.

 

Like they say, old habits die hard.

I am speaking from experience with MSN and an empty mIRC. I had weird errors of no channel and such. When I traced it back it turned out that mIRC was dropping the channel name. When I removed the % it worked fine. Then I looked in Nuclear and Vincula and saw that they did this as well. They removed the % and then put it back on when sending to the server. This was just my experience working with mIRC and MSN where the room names were %#roomname. So I figured it was a universal issue considering I had no scripts loaded in my mIRC.

I am speaking from experience with MSN and an empty mIRC. I had weird errors of no channel and such. When I traced it back it turned out that mIRC was dropping the channel name. When I removed the % it worked fine. Then I looked in Nuclear and Vincula and saw that they did this as well. They removed the % and then put it back on when sending to the server. This was just my experience working with mIRC and MSN where the room names were %#roomname. So I figured it was a universal issue considering I had no scripts loaded in my mIRC.

 

You're being pretty vague about what "exactly" caused these errors. I have given you code that shows you do not need to use $chr(), and also shown you that you can pass %#blah as a parameter without having mIRC evaluate it. I'm not sure exactly what you did to get the error, but it was down to a scripting error.

first of. thank you all for your help.

 

that said. in the text bar all works.

however, :oops: in my hurry to get to work on time. i forgot to mention i meant for in remotes.

/msg or //msg wont work there.(or at least not with the connection im using).

i tried the $chr solution and that worked fine in remotes. so i assume the % $+ # might work as well

havent gotten around to testing it yet.

and prolly wont either. seeing the post you made all seem to suggest that i either remove the % while working with the roomname. or use the $chr() solution .

 

and yes, as you guessed its for a site using the ocx. a modded paperirc.

i dont have any docs on that server and since i dont know what is modded. expect more stupid questions of me :P

 

It was over a year ago that I had to deal with %# room names. It was a join event and the alias using the room name in it. But with the % in the room name, when it got to the alias the room name was gone. When I removed the % it worked fine.