mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2006
Posts: 47
C
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Mar 2006
Posts: 47
What about a sections in the options to simply change the formatting for the default text for events like QUIT, JOIN, NICK... Like if you wanted the NICK change event to be like "* $nick --> $newnick" instead of "* $nick is now known as $newnick". Each applicable remote event would have a text box in this options which would contain the text, identifiers, and whatnot that would be displayed.

I know you can just use the ^ prefix with remote scripts, and that's what I'm doing, but I just thought this might tidy things up just a little bit.

(and why did I have to switch from Firefox to IE to post this? "Firewall issue" my butt. =_=)

An example of what I'm using:
on ^*:BAN:#:{
echo -g $chan $tabTo($timestamp(4) * Ban!: $nick $+ » $+ $readini(Misc.ini,format,tabset1) $+ » $+([1,$ial($banmask,1).nick,4]) $banmask)
halt
}
where $tabTo is an alias that simulates tabbing, whose character doesn't seem to be supported... =_=

Last edited by CitizenKane; 11/12/06 04:04 AM.
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
I agree, there should a simpler way for users to alter the basic format of messages for those don't want to script it. With all the identifiers that'd be needed for scripters to emulate those messages too of course (ie. using $eval($quitmsgfmt,2) or something)

As for the Firefox thing I have no idea why you had to switch, I've never had any trouble using it on these forums. Unless it's a problem specific to FF 2.x?


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
We have been asking for this type of thing for VERSIONS now. I think as easrly as when Khaled introduced Timestamp editability (is that a word? Ah well, it is now lol). People have asked for "nick border" changing ability, asterisk (*) changing abilities and many other things. I for one, while my mirc time is cut down drastically from before, would LOVE to see this. I too wanted to change mirc but didnt wanna run all the scripting needed to fix it. I would LOVE to see something similar to (bad ascii art to follow):

-IRC
| -Themes
| |Channel

Then on the right side of it

Code:
  [] Timestamp Events _____________ (enter your format)
  [] Nick Borders _________________ (enter your format)
  [] Event Prefix Symbol __________ (enter your format)
  [] Mode Change __________________ (enter your format)
  [] Nick changing ________________ (enter your format)
  [] Join _________________________ (enter your format)
  [] Part _________________________ (enter your format)
  [] Quit _________________________ (enter your format)


etc etc etc you enter how you want it to display it. So, those lines would work kind of like this:

[x] Timestamp Events mm/dd/yy HH:nn.ss (enter your format)
[x] Nick Borders $nick (enter your format)
[x] Event Prefix Symbol *** (enter your format)
[x] Mode Change New mode $nick --> $nick(#,$nick).pnick (enter your format)
[x] Nick changing *** $nick --> $newnick (enter your format)

This is JUST an example and I KNOW it would require some coding to say the least, but this TYPE of thing would just ROCK. The colors too would be great to use (check out the Nick changing if you didnt see it). This way we could theme our own stuff in a basic manner. YES it can be scripted, and MTS themes are out there, but I feel this type of self theming is LONG overdue


Those who fail history are doomed to repeat it
Joined: Mar 2006
Posts: 47
C
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Mar 2006
Posts: 47
And on a possibly related note, why is it that the user mode "+h" is called ":HELP:" in the remote section (user is... helped/dehelped respectively), while the boolean check for the mode is "ishop" (nickname v1 is a halfop on channel v2)?

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Because the real name for a halfop is "helper". It was easier for people to say halfop, I guess, or it made more sense to them, or something. Anyhow, halfop is more commonly used these days. hop in ishop could easily be "helper op," thought I'm unsure if hop was used prior to halfop becoming the common wording.


Invision Support
#Invision on irc.irchighway.net
Joined: Mar 2006
Posts: 47
C
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Mar 2006
Posts: 47
Well, I just thought it a little bit odd that it was called different things in different parts of the help files. But that doesn't really matter.

Another thing that would really be helpful in altering the default text would be an alias... that said the default text. As in, mIRC would display the text however it normally would, and then continue with the script, for any of the remote events whose default text can be overwritten.

In my case, I have a dynamic alias being called (with [ $gettok(%trigger,2-,32) ]). If mIRC reaches this part of the script, I want default text to be displayed before the trigger is used, but adding a "timer 1 0" screws up the function call, because then $chan, $nick, etc resolve to $null...

I echo it instead, but the timestamp shows up twice in my logs...

Last edited by CitizenKane; 25/12/06 03:13 PM.
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Just insert /msg $chan (or $nick) $1- above the extra text, or use /say $1- . Then halt the input script.


Invision Support
#Invision on irc.irchighway.net
Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
That's a great suggestion, I agree completely.

I often find myself in this situation, too... needing to script a lot just for some cosmetic changes. Although this isn't really a disaster for me, people who don't script would love it. Some could say "well then just script such a feature for these people", but I know I'd prefer this coming from mIRC, rather than from some random script out there.


* cold edits his posts 24/7
Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
Yeah, I personally think this kind of internal thing is long overdue. Who knows if something like this will ever get done or not, but hey, even if it doesn't, mirc's still the #1 windows chat program out there laugh


Those who fail history are doomed to repeat it
Joined: Mar 2006
Posts: 47
C
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Mar 2006
Posts: 47
Originally Posted By: Riamus2
Just insert /msg $chan (or $nick) $1- above the extra text, or use /say $1- . Then halt the input script.


No, you misunderstand. I'm talking about how the text is displayed on my end, from the TEXT event, not the INPUT event.

As in, someone says "!triggers" in the channel. I want an alias like "/displaydefault" that will cause "[12:34] <Bob> !triggers" to appear in my channel window. After that is displayed, then I can use the dynamic alias calling above to get the corresponding function, which then displays its own text.

Otherwise, I see my response on the screen before I see the initial trigger. And as I said below, using a timer for the trigger alias call doesn't work because important identifiers resolve to $null.

Echoing isn't a satisfactory solution either, because the text isn't logged properly (timestamp shows up twice...).

Last edited by CitizenKane; 31/12/06 10:21 PM.
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
did i misss something or cant u just use a format like
on *:TEXT:!trigger *:#:{ what ever here, and the defualt text has displayed already }

?

Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
In that instance yes, but I think he means in a more general sense. As it stands, messages can be emulated using echo with the relevant switches. However if the message format was changeable then that wouldn't work anymore and you'd either need an identifier to use in conjunction with echo or an entirely new command for this explicit purpose.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Mar 2006
Posts: 47
C
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Mar 2006
Posts: 47
Originally Posted By: DaveC
did i misss something or cant u just use a format like
on *:TEXT:!trigger *:#:{ what ever here, and the defualt text has displayed already }

?

I do things differently. I use the "^" prefix, because sometimes, I want the TEXT to be displayed differently than usual (i.e. display triggers differently, and don't log them).

Here's part of my remote script:
Code:
;NOTE: This event triggers for EVERY text event.  This works better for my purposes (the stuff I'm not showing below).
ON ^1:TEXT:*:*:{

  ;<<<<<< the rest of my TEXT scripts go here >>>>>>>

  ;[[[[[ TRIGGERS ]]]]]
  if ((%triggers_off) || (%triggers_off. [ $+ [ $chan ] ] ) || (! !isin $1) || (_about isin $1)) goto end
  if ($readini(Misc.ini,triggers,$1) == $null) goto end
  /var %trigger = $ifmatch
  if ((!$gettok(%trigger,1,32)) && ($2)) goto end

  ;>>>>>Current work around to display text normally, doesn't log properly.
  echo $chan $timestamp $+(<,$nick($chan,$nick).pnick,>) $1-

  ;>>>>>The matched ini line contains the corresponding alias to be called, along with needed parameters.
  [ $gettok(%trigger,2-,32) ]
  if ($result != 404) {
    .timer_nick.alert* off
    /event 0,12[ $+ $chan $+ ]14,0<<4 $1 Trigger Used ( $+ $nick $+ ):3 $1-
    /set -u6 %triggers_off. [ $+ [ $chan ] ] 6
  }
  halt

  :end
  ;>>>>Text to ignore:
  if (($1- == @find) || ($1 == !download) || (($left($1- ,1) == !) && ($0 == 1) && (!$readini(Misc.ini,triggers,$1))) /remote_format $1-
;>>>"/remote_format" is an alias that uses "echo -g" with my own custom formatting depending on $event.  In the case of TEXT, it displays with a gray background (and doesn't log, of course).
}



And actually, that last line got me thinking. In addition to providing somewhere to tweak the default text, would it be possible to add something that will temporarily change the color settings? I don't mean something like "[ctrl+K]1,15", because that only covers the length of the text. I mean that entire line (and specifically that line), however many lines it is and changing with window resizes, to have a gray (or whatever) background. Though I guess that might be a little too much to ask for?

To achieve that effect in my "/remote_format" alias, I had to write my own tabbing alias in conjunction with a different ascii space (not 32) which I also use in my "/remote_format" anyway:

Code:
/remote_format {
  if ($event isin "~OP~HELP~VOICE~DEOP~DEHELP~DEVOICE~UNBAN~") {
    if ($1- == %usermode_change. [ $+ [ $chan ] ]) halt
    /set -u1 %usermode_change. [ $+ [ $chan ] ] $1-
  }
  if ($chan) /remote_echo $chan $readini(Misc.ini,format,$event)
  else {
    /var %loop = 0, %nick = $iif($newnick,$newnick,$nick)
    while (%loop < $comchan(%nick,0)) {
      inc %loop
      remote_echo $comchan(%nick,%loop) $readini(Misc.ini,format,$event)
    }
  }
  halt
}
/remote_echo {
  if ($len($3- ) > $readini(Misc.ini,format,maxlen)) /var %text = $left($3- ,$calc($readini(Misc.ini,format,maxlen) - 3)) $+ ...
  else if ($len($3- ) == $readini(Misc.ini,format,maxlen)) /var %text = $3-
  else /var %text = $tabTo($3- $+ $+(»,$calc($readini(Misc.ini,format,maxlen) - 1),»,$chr(160)))

  if ($event == NICK) /echo $1  $+ $2 $+ %text
  else /echo -g $1  $+ $2 $+ ,15 $+ %text
}

/tabTo {
  ;[text]»[number]»[text]»[number]»...

  /tokenize 187 $1-
  /var %num_tok = 2, %spaces, %text = $1

  while (%num_tok < $0) {
    %spaces = $calc($ [ $+ [ %num_tok ] ] - $len($strip(%text)))
    while (%spaces > 0) {
      ;%text = %text 
      %text = %text $+ $chr(160)
      dec %spaces
    }
    inc %num_tok
    %text = %text $+ $ [ $+ [ %num_tok ] ]
    inc %num_tok
  }
  return %text
}

Then I still have to figure out how many spaces are in a line, and make sure my channel windows are all the same size vs the nick list, and make sure I don't change the size of the mirc window, and add an additional alias to cut off text that would stretch more than one line...




In summary (^^;;), the three features I would be happy to see are:

  • /display_default_text
  • /change_color_settings
  • An options menu to tweak default event display settings.

Last edited by CitizenKane; 01/01/07 01:37 AM.

Link Copied to Clipboard