mIRC Home    About    Download    Register    News    Help

Print Thread
A
Anonymous
Unregistered
Anonymous
Unregistered
A
hi. i'd like to know how to replace the format for the channel text.
what i mean is: if normally the text that appears when someone says something is:

[16:50:39] <testnick> hello world!

i want it to look like:

[16:50:39] •••testnick•••>> hello world!

the code that i tried with is:
Code:
 
on *:TEXT:#:{
  if ($nick == $me) {
    .echo $chan $timestamp ••• $+ $me $+ •••&gt;&gt; $1- (my text)
    haltdef
  }
  else {
    .echo $chan [ $+ $timestamp $+ ] ••• $+ $me $+ •••&gt;&gt; $1- 
    haltdef
  }
} 


i wrote separately for my own nick and different nicks in case i need to change colors, but it doesn't work.
some help from more experienced people perhaps? smile
thanks

Joined: Aug 2005
Posts: 128
S
Vogon poet
Offline
Vogon poet
S
Joined: Aug 2005
Posts: 128
ON TEXT event is not triggered for yourself
Code:
on ^*:text:*:*:{
.echo -t $target $+(•••,$nick,•••,&gt;&gt;) $1-
halt
}

on 1:input:*:{
if ($left($1,1) != /) || ($ctrlenter) {
.echo -t $active $+(•••,$me,•••,&gt;&gt;) $1-
.raw privmsg $active : $+ $1-
halt
}
}

Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
Made some changes and added custom display even when using commands instead of just typing.

Code:
on ^*:text:*:*:{
  echo -ambflrt $+(•••,$nick,•••&gt;&gt;) $1-
  halt
}

on 1:input:*:{
  if ($left($1,1) != /) || ($ctrlenter) {
    .echo -amrtc own $+(•••,$me,•••&gt;&gt;) $1-
    .!say $1-
    haltdef
  }
}
alias msg {
  if ($isid) return
  if ($window($1)) {
    echo -mrtc own $1 $+(•••,$me,•••&gt;&gt;) $$2-
    !.msg $1-
  }
  ; change nothing if no window is open for that nick/channel
  else !msg $$1-
}
alias say {
  if ($isid) return
  echo -amrtc own $+(•••,$me,•••&gt;&gt;) $$1-
  !.msg $1-
}

Joined: Aug 2005
Posts: 128
S
Vogon poet
Offline
Vogon poet
S
Joined: Aug 2005
Posts: 128
This is much more better smile

A
Anonymous
Unregistered
Anonymous
Unregistered
A
hi & thanks
it works fine when someone else says something, however when i write something, it writes my text both in the old format and the new format.
there must be a small error there smile

Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
Apparently !.say isn't quiet, so I changed it to !.msg $active. mIRC scripting in a browser window is bad crazy

Code:
on ^*:text:*:*:{
  echo -ambflrt $+(•••,$nick,•••&gt;&gt;) $1-
  halt
}

on 1:input:*:{
  if ($left($1,1) != /) || ($ctrlenter) {
    .echo -amrtc own $+(•••,$me,•••&gt;&gt;) $1-
    !.msg $active $1-
    haltdef
  }
}
alias msg {
  echo -a hoi hois msg
  if ($isid) return
  if ($window($1)) {
    echo -mrtc own $1 $+(•••,$me,•••&gt;&gt;) $$2-
    !.msg $1-
  }
  ; change nothing if no window is open for that nick/channel
  else !msg $$1-
}
alias say {
  echo -a hoi hoi say
  if ($isid) return
  echo -amrtc own $+(•••,$me,•••&gt;&gt;) $$1-
  !.msg $active $1-
}

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
hoi hoi to you too :tongue:


Gone.
Joined: Aug 2005
Posts: 128
S
Vogon poet
Offline
Vogon poet
S
Joined: Aug 2005
Posts: 128
Code:
alias say {
  echo -a hoi hoi say
  if ($isid) return
  echo -amrtc own $+(•••,$me,•••&gt;&gt;) $$1-
  [color:red]!.[/color]msg $active $1-
}

I'd suggest removing the ! and the ., else the /say will be quiet

Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
Erm, you might want to remove some echo lines too yes shocked blush
Never copy work-in-progress code from irc to a forum grin

Ah well, now I understand your reply, too bad I didn't when I could still edit my post frown

Joined: Aug 2005
Posts: 128
S
Vogon poet
Offline
Vogon poet
S
Joined: Aug 2005
Posts: 128
I don't understand what you want to say smile

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
He understands now what I meant with my post in reply to him.

Btw, please reply to the correct person. You can do that by going to the post of the person you want to reply to, and click Reply. Yes, I'm aware it sounds really stupid to explain, though for some reason some people still don't get it right.


Gone.
Joined: Aug 2005
Posts: 128
S
Vogon poet
Offline
Vogon poet
S
Joined: Aug 2005
Posts: 128
I know how to use the Reply smile

A
Anonymous
Unregistered
Anonymous
Unregistered
A
for some reason this code that you wrote stefys99, a few post back, doesn't work. it doesn't show what other people say on the channel, i can't figure it out why. :tongue:
i'm reffering to the first post you wrote.

maybe you cand fix it ? smirk
i like it better because it's shorter and more simple. wink

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
I made my comment about replying, because you replied to me with that code, whilst I am not the one requesting code here. The original requester is, so he's the one that should be replied to with solutions.


Gone.

Link Copied to Clipboard