mIRC Home    About    Download    Register    News    Help

Print Thread
S
sicboy
sicboy
S
Hey just wondering if anyone can help us.. I wanna change <nickname> to something like this ::nickname:: i didnt know exactly what i was looking for so i couldnt do a search.. sorry if the question has been asked before

Darcy blush

N
nycdiesel
nycdiesel
N
If you're talking about changing the display of the text in channels then try this:

Code:

ON ^*:TEXT:*:#:{
echo $color(normal) # $+(::,$nick,::) $1-
haltdef
}


Joined: Feb 2004
Posts: 2,013
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Feb 2004
Posts: 2,013
To disable the script: /disable #displaytext
To enable the script: /enable #displaytext

You can override your own text being formatted by pressing ctrl+enter instead of enter.
It doesn't format your text when you paste something.

If you only want to change other people's sentences, and not yours, then you can just delete the on input event entirely, leaving only the one line of code.

Code:
#displaytext on
on *:input:*:{ 
  if (!$istok(/ $readini($mircini,text,commandchar),$left($1,1),32)) &amp;&amp; ($istok(channel chat query,$window($active).type,32)) &amp;&amp; (!$ctrlenter) &amp;&amp; (!$inpaste) { 
    haltdef 
    .msg $active $1- 
    echo -artc own $+(::,$me,::) $1- 
  } 
}

on ^*:text:*:*: haltdef | echo -mbflirt $iif($chan,$chan,$nick) $+(::,$nick,::) $1- 
#displaytext end

S
sicboy
sicboy
S
*edit*

cheers for that smile smile much appreciated *bows down* cool

Last edited by sicboy; 14/10/05 02:42 PM.
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
When using FiberOPtic's version...

If you want timestamps, insert $timestamp in front of $+(::,$nick,::) and $+(::,$me,::)

His should also do both your text and others' text just fine.

Joined: Feb 2004
Posts: 2,013
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Feb 2004
Posts: 2,013
That won't be necessary, as I've used the -t flag with echo smile

Granted, the -t switch won't work when Timestamping has been disabled in the mIRC Options, though I would imagine that they don't want to see the timestamp anyway if they've turned this option off.

For the original requester, if you didn't see timestamps with my code, then type /timestamp on

Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
Ah, missed that. Since he had asked, I just assumed it wasn't there and since I don't use timestamps, I forgot about -t anyhow. laugh

A
Anonymous
Anonymous
A
do you think it's wise to read from the ini file every time some text appears in channels?
not only is it slow but also generates alot of unneeded file access on you hard-drive and slows your system down in general.

D
DaveC
DaveC
D
For a start its on the ON INPUT not a ON TEXT so it only checks the INI file once for every time you enter a line. and you can always just NOT read the INI, and when someone changes the command character, then your script doesnt work, wouldnt that be good.

So as to slow? No its not, and no it doesnt put any great file access stresses on anyway, thats what caching is all about.

As to a slow down in general, since it never trips untell your completed a line of text, and the machines idled around 90% of the time while your typing, i dout its much of a system drag.

Joined: Feb 2004
Posts: 2,013
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Feb 2004
Posts: 2,013
I appreciate constructive comments, though do your homework next time you want to make false statements.

Code:
alias testini {
  var %a = 1000, %b = $ticks
  while (%a) {
    !.echo -q $readini($mircini,text,commandchar)
    dec %a
  }
  echo -a $calc($ticks - %b) milliseconds for 1000 operations
}


This takes 235 milliseconds on my computer for 1000 iterations, and that's even with the while loop, !.echo -q and dec %a included. So I'm thinking doing a couple of reads now and then isn't gonna be much of a system drag wink




Link Copied to Clipboard