mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2005
Posts: 2
S
sicboy Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
S
Joined: Oct 2005
Posts: 2
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

Joined: Dec 2004
Posts: 81
N
Babel fish
Offline
Babel fish
N
Joined: Dec 2004
Posts: 81
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,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
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


Gone.
Joined: Oct 2005
Posts: 2
S
sicboy Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
S
Joined: Oct 2005
Posts: 2
*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,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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.


Invision Support
#Invision on irc.irchighway.net
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
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


Gone.
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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


Invision Support
#Invision on irc.irchighway.net
A
Anonymous
Unregistered
Anonymous
Unregistered
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.

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
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,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
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