mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
#160170 24/09/06 12:14 AM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
okay to simplify things.

when you type /MAP

xxx raws shows you network map (if not disabled that is)

so i choosed to put it in @window with name
@ $+ $network $+ $chr(160) $+ Map

so to get ridd of such windows (on disconnection)
i made alias that closes all @windows but
unfortunately i cant use
/window -c @ $+ $network $+ $chr(160) $+ Map

so i ask how to solve this problem or i am
stucked with general names like
Network $+ $chr(160) $+ Map instead using $network :P

?


IceCapped
#160171 24/09/06 12:20 AM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Why cant you use /window -c @ $+ $network $+ $chr(160) $+ Map ?

#160172 24/09/06 12:22 AM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
ahhh... night affects my senile brain ...

forgot to say that i cant use it if im on multiple (different)
networks

alias doesnt even close active network window :P

Last edited by raZOR; 24/09/06 12:24 AM.

IceCapped
#160173 24/09/06 12:23 AM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Why?

#160174 24/09/06 12:24 AM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
Quote:
Why?


lol i dont know...

it just wont :P

im ATM on QuakeNet and UnderNet and it wont trigger closing
(from alias)

Last edited by raZOR; 24/09/06 12:25 AM.

IceCapped
#160175 24/09/06 12:26 AM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Code:
on *:disconnect:{ 
  if ($window($+(@,$network,$chr(160),Map))) { window -c $v1 }
}

#160176 24/09/06 12:29 AM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
ok, i wont pull your nose around :P

this is alias i have:

alias clear_server_infos {
.window -c @Server $+ $chr(160) $+ Info
.window -c @IRCD $+ $chr(160) $+ Info ( $+ $network $+ )
.window -c @ $+ $network $+ $chr(160) $+ Map
.window -c @MOTD
}

and since im too stupid to "inject" your code for all windows :P
i ask for help ^_^


IceCapped
#160177 24/09/06 12:31 AM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
I'm not sure what you mean.. exactly when do you want to close the windows and which ones do you want to close?

#160178 24/09/06 12:35 AM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
i have this alias called on disconnect event
and since i cant find any identifier that checks
if specifited window is opened or not, i made
this lame alias to close them all no matter what :P

and since mirc doesnt complain of existance/non-existance
of window when closing i added them all :P


IceCapped
#160179 24/09/06 12:40 AM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
if ($window(...)) checks if a window is open.

Code:
alias clear_server_infos {
  if ($window($+(@Server,$chr(160),info))) { window -c $v1 }
  if ($window($+(@IRCD,$chr(160),info))) { window -c $v1 }
  if ($window($+(@Server,$network,$chr(160),Map))) { window -c $v1 }
  if ($window(@MOTD)) { window -c $v1 }
}

#160180 24/09/06 12:44 AM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
unfortunately it doesnt work smirk
(manual or with event)

tried changing focus of mirc from 1st to 2nd multi connection.
also tried with disconnect/connect

also wont work

Last edited by raZOR; 24/09/06 12:45 AM.

IceCapped
#160181 24/09/06 12:47 AM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Which version of mIRC are you using?

#160182 24/09/06 12:47 AM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
6.2 (not 6.02) ^_^

Last edited by raZOR; 24/09/06 12:48 AM.

IceCapped
#160183 24/09/06 12:50 AM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Maybe someone else can see what's wrong with it. I'm too tired to check now, but I'll look in the morning if nobody else has.

#160184 24/09/06 12:51 AM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
oki =)
thanks for helping i apreciate it !


IceCapped
#160185 24/09/06 01:10 AM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
okay, for who ever is going to read this i changed some (not all) because multi connections, so these are final names :P

1. @Server $+ $chr(160) $+ Info $+ $chr(160) $+ ( $+ $network $+ )
2. @IRCD $+ $chr(160) $+ Info $+ $chr(160) $+ ( $+ $network $+ )
3. @ $+ $network $+ $chr(160) $+ Map
4. @MOTD $+ $chr(160) $+ ( $+ $network $+ )

Last edited by raZOR; 24/09/06 01:10 AM.

IceCapped
#160186 24/09/06 01:12 AM
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
Can you post the events and aliases that affect those windows? Where are they opened, populated, manipulated, closed, etc. ?

If your windows are actually named as you say, I can't see any reason why hixxy's code doesn't work for you.

-genius_at_work

#160187 24/09/06 01:30 AM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
sure i can, but its a mess to look at.
so ill save you some trouble thinking what is what :P


1. $theme(logo) - this is just some alias script calls to make colorfull line (themed), just ignore this smile
2. if (%srvinfstatus == on) - if on, shows info in status
3. elseif (%srvinfwin == on) - if on, shows info in @windows
-- youll see those 2 alot --
4. if (%hmotd == on ) - if on, hides motd (doesnt show it at all)


as for alias, already said, its put in ON DISCONNECT event
but also doesnt work manul nor in event (for me)

there now enjoy this mess grin

Code:

;------------------------------------------------
;               Server Info
;------------------------------------------------

alias clear_server_infos {
  if ($window($+(@Server,$chr(160),info))) { window -c $v1 }
  if ($window($+(@IRCD,$chr(160),info))) { window -c $v1 }
  if ($window($+(@,$network,$chr(160),Map))) { window -c $v1 }
  if ($window(@MOTD)) { window -c $v1 }
}

raw 001:*:{
  haltdef
  if (%srvinfstatus == on) {
    .echo -s $timestamps $+ $theme(logo) $2-
    halt
  }
  elseif (%srvinfwin == on) {
    window -k +s @Server $+ $chr(160) $+ Info $+ $chr(160) $+ ( $+ $network $+ ) 220 50 320 290 @Server $+ $chr(160) $+ Info $+ $chr(160) $+ ( $+ $network $+ ) Verdana 11
    .aline @Server $+ $chr(160) $+ Info $+ $chr(160) $+ ( $+ $network $+ ) $timestamps $+ $theme(logo) $2-
    halt
  }
}


raw 002:*:{
  haltdef
  if (%srvinfstatus == on) {
    .echo -s $timestamps $+ $theme(logo) $2-
    halt
  }
  elseif (%srvinfwin == on) {
    .aline @Server $+ $chr(160) $+ Info $+ $chr(160) $+ ( $+ $network $+ ) $timestamps $+ $theme(logo) $2-
    halt
  }
}



raw 003:*:{
  haltdef
  if (%srvinfstatus == on) {
    .echo -s $timestamps $+ $theme(logo) $2-
    .echo -s $timestamps $+ $theme(logo) $chr(160)
    halt
  }
  elseif (%srvinfwin == on) {
    .aline @Server $+ $chr(160) $+ Info $+ $chr(160) $+ ( $+ $network $+ ) $timestamps $+ $theme(logo) $2-
    .aline @Server $+ $chr(160) $+ Info $+ $chr(160) $+ ( $+ $network $+ ) $timestamps $+ $theme(logo) $chr(160)
    halt
  }
}

raw 004:*:{
  haltdef
  if (%srvinfstatus == on) {
    .echo -s $timestamps $+ $theme(logo) Usermodes available: $4
    .echo -s $timestamps $+ $theme(logo) Channelmodes available: $5 
    halt
  }
  elseif (%srvinfwin == on) {
    .aline @Server $+ $chr(160) $+ Info $+ $chr(160) $+ ( $+ $network $+ ) $timestamps $+ $theme(logo) Usermodes available: $4
    .aline @Server $+ $chr(160) $+ Info $+ $chr(160) $+ ( $+ $network $+ ) $timestamps $+ $theme(logo) Channelmodes available: $5
    halt
  }
}


raw 005:*:{
  haltdef
  .set %and $chr(38)
  .set %hash $chr(35)
  tokenize 32 $2-
  if ($wildtok($1-,CHANTYPES=*,1,32)) { set %chantypes $gettok($ifmatch,2-,61) }
  if (%srvinfstatus == on) {
    if (%hash $+ %and isincs %chantypes) { 
      .echo -s $timestamps $+ $theme(logo) $chr(160)
      .echo -s $timestamps $+ $theme(logo) Global and Local Channel Types (# and &) are supported by this server.
      .echo -s $timestamps $+ $theme(logo) To join such channels type:
      .echo -s $timestamps $+ $theme(logo) Global Channel: /join #channel (or /j channel).
      .echo -s $timestamps $+ $theme(logo) Local Channel: /join &channel (or /j &channel).
    }
    .unset %chantypes
  }
  elseif (%srvinfwin == on) {
    if (%hash $+ %and isincs %chantypes) { 
      .aline @Server $+ $chr(160) $+ Info $+ $chr(160) $+ ( $+ $network $+ ) $timestamps $+ $theme(logo) $chr(160)
      .aline @Server $+ $chr(160) $+ Info $+ $chr(160) $+ ( $+ $network $+ ) $timestamps $+ $theme(logo) Global and Local Channel Types (# and &) are supported by this server.
      .aline @Server $+ $chr(160) $+ Info $+ $chr(160) $+ ( $+ $network $+ ) $timestamps $+ $theme(logo) To join such channels type:
      .aline @Server $+ $chr(160) $+ Info $+ $chr(160) $+ ( $+ $network $+ ) $timestamps $+ $theme(logo) Global Channel: /join #channel (or /j channel).
      .aline @Server $+ $chr(160) $+ Info $+ $chr(160) $+ ( $+ $network $+ ) $timestamps $+ $theme(logo) Local Channel: /join &channel (or /j &channel).
      .unset %chantypes
      halt
    }
  }
}

;IRCD Info
alias info {
  if (%srvinfwin == on) { .clear @IRCD $+ $chr(160) $+ Info $+ $chr(160) $+ ( $+ $network $+ ) | .quote info }
}


raw 371:*:{
  haltdef
  if (%srvinfstatus == on) {
    .echo -s $timestamps $+ $theme(logo) $network Info:
    .echo -s $timestamps $+ $theme(logo) $chr(160)
    .echo -s $timestamps $+ $theme(logo) $chr(160)
    .echo -s $timestamps $+ $theme(logo) $chr(160) $2-
    halt
  }
  elseif (%srvinfwin == on) {
    window -lkg1 +s @IRCD $+ $chr(160) $+ Info $+ $chr(160) $+ ( $+ $network $+ ) 220 50 320 290 @IRCD $+ $chr(160) $+ Info $+ $chr(160) $+ ( $+ $network $+ ) Verdana 11
    if !$line(@IRCD $+ $chr(160) $+ Info $+ $chr(160) $+ ( $+ $network $+ ),0) {
      .aline @IRCD $+ $chr(160) $+ Info $+ $chr(160) $+ ( $+ $network $+ ) $theme(logo) $network Info:
      .aline @IRCD $+ $chr(160) $+ Info $+ $chr(160) $+ ( $+ $network $+ ) $chr(160)
      .aline @IRCD $+ $chr(160) $+ Info $+ $chr(160) $+ ( $+ $network $+ ) $chr(160)
    }
    .aline @IRCD $+ $chr(160) $+ Info $+ $chr(160) $+ ( $+ $network $+ ) $theme(logo) $2-
    halt
  }
}

raw 374:*:{
  haltdef
  if (%srvinfstatus == on) {
    .echo -s $timestamps $+ $theme(logo)
    .echo -s $timestamps $+ $theme(logo) $2-
    halt
  }
  elseif (%srvinfwin == on) {
    .aline @IRCD $+ $chr(160) $+ Info $+ $chr(160) $+ ( $+ $network $+ ) $chr(160) 
    .aline @IRCD $+ $chr(160) $+ Info $+ $chr(160) $+ ( $+ $network $+ ) $theme(logo) $2-
    halt
  }
}

;/MAP
alias map {
  if (%srvinfwin == on) { .clear @ $+ $network $+ $chr(160) $+ Map | .quote map }
}

raw 006:*:{
  window -lkg1 +s @ $+ $network $+ $chr(160) $+ Map 220 50 320 290 @ $+ $network $+ $chr(160) $+ Map Verdana 11
  .aline @ $+ $network $+ $chr(160) $+ Map $theme(logo) $network Map:
  .aline @ $+ $network $+ $chr(160) $+ Map $chr(160)
  .aline @ $+ $network $+ $chr(160) $+ Map $chr(160)
  .aline @ $+ $network $+ $chr(160) $+ Map $2-6
  halt
}
raw 007:*:{
  .aline @ $+ $network $+ $chr(160) $+ Map $chr(160) 
  .aline @ $+ $network $+ $chr(160) $+ Map $theme(logo) End of /MAP
  halt
}


;MOTD
alias motd {
  if (%srvinfwin == on) { .clear @MOTD $+ $chr(160) $+ ( $+ $network $+ ) | .quote motd }
}

raw 372:*:{
  haltdef
  if (%hmotd == on ) { halt }
  window -lkg1 +s @MOTD $+ $chr(160) $+ ( $+ $network $+ ) 220 50 320 290 @MOTD Verdana 11
  if !$line(@MOTD $+ $chr(160) $+ ( $+ $network $+ ),0) {
    .aline @MOTD $+ $chr(160) $+ ( $+ $network $+ ) $theme(logo) $network Message of the Day
    .aline @MOTD $+ $chr(160) $+ ( $+ $network $+ ) $chr(160)
    .aline @MOTD $+ $chr(160) $+ ( $+ $network $+ ) $chr(160)
  }
  .aline @MOTD $+ $chr(160) $+ ( $+ $network $+ ) $theme(logo) $2-
  halt
}

raw 376:*:{
  haltdef
  if (%hmotd == on ) { halt }
  .aline @MOTD $+ $chr(160) $+ ( $+ $network $+ ) $chr(160) 
  .aline @MOTD $+ $chr(160) $+ ( $+ $network $+ ) $theme(logo) $2-
  halt
}

  


now you can really say OMFG WTF is this :P

Last edited by raZOR; 24/09/06 01:31 AM.

IceCapped
#160188 24/09/06 04:55 AM
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
Well, the code as you have it there won't close the windows because you've changed your window names throughout the code, except in the alias that closes them. Change those ones too, and it should work.

BTW, I would make an alias that formats the window name for you, and then use it instead of having $+ $+ $+ $+ all over the place. The ()'s also make it more difficult to refer to the window.

alias winname return $replace($1-,$chr(32),$chr(160))

And then in your code:

window -k +s $winname(@MOTD $network) blah blah blah

-genius_at_work

#160189 24/09/06 12:21 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
Quote:
The ()'s also make it more difficult to refer to the window.



so im stuck with windows with no identifiers ? smirk

Last edited by raZOR; 24/09/06 12:21 PM.

IceCapped
Page 1 of 2 1 2

Link Copied to Clipboard