mIRC Home    About    Download    Register    News    Help

Print Thread
#184305 27/08/07 05:15 PM
Joined: May 2004
Posts: 49
G
GalaxeY Offline OP
Ameglian cow
OP Offline
Ameglian cow
G
Joined: May 2004
Posts: 49
Ok... I know this is question might be a out of the question thing to do, but I want to make a channel-central that is different in each network. Like: UnderNet, got Undernet modes. And if I go to DalNet it has DalNet modes. I'm a newbie when it comes to scripting.


Signature:
I'm boring, ain't I? Oh well...:|
GalaxeY #184306 27/08/07 05:21 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Like which modes do you have in mind, modes: t,i,n,m,k,l,p,s will all be the same.

DALnet uses channel modes: +bceiIjklLmMnoOprRstv

Joined: May 2004
Posts: 49
G
GalaxeY Offline OP
Ameglian cow
OP Offline
Ameglian cow
G
Joined: May 2004
Posts: 49
I was thinking all channel modes.


Signature:
I'm boring, ain't I? Oh well...:|
GalaxeY #184310 27/08/07 06:48 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Here's how you could go about it, I'd suggest getting dstudio (dialog editor).

Code:
alias channel {
  if (!$dialog(cc)) {
    if ($active ischan) {
      dialog -mo cc cc
      dialog -t cc mIRC Channel Central $active
      echo 3 * Retrieving $active modes...
    }
  }
}

dialog cc {
  title ""
  size 320 220 380 326
  ;Tab for networks other than EFnet, Undernet, DALnet etc..
  tab "", 1, -1 -14 384 355
  ;DALnet tab
  tab "2", 2
  ;EFnet tab
  tab "", 3
  ;Undernet tab
  tab "", 4

}

On *:Dialog:cc:*:*: {
  if ($devent == init) {
    if ($network == DALnet) {
      did -f cc 2
    }
    if ($network == EFnet) {
      did -f cc 3
    }
    if ($network == Undernet) {
      did -f cc 4
    }
  }
}


Basically, you have 1 tab for any network, which should look like mIRC's current Channel Central. Then on tab 2 you have DALnets modes, tab 3 EFnet and 4 for Undernet. I'm not going to fully code it because I have work in a bit otherwise I'd attempt it. I've given an example, you just need to put the check box's and such in place in that dialog (using dstudio). When the channel central opens, it determines the network and then selects the appropriate tab. And doesn't select any if it doesn't match a network (mIRC's default Channel Central).

When all the controls are added you can replace the size line with:

Code:
  tab "", 1, -1 -14 384 355


So the tabs are partially hidden.

Joined: May 2004
Posts: 49
G
GalaxeY Offline OP
Ameglian cow
OP Offline
Ameglian cow
G
Joined: May 2004
Posts: 49
Ok. But is it possible that I can have it on just one tab. Like, if I go on DalNet, and press the channel-central, the channel modes goes there, and if I go on UnderNet and press channel-central, the channel modes goes there?


Signature:
I'm boring, ain't I? Oh well...:|
GalaxeY #184374 28/08/07 08:27 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Well it is possible that'd involve hiding the controls, but with the multiple tabs no one will ever know they are there since they are hidden.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
That's not really necessary. You can use a single dialog without tabs for all networks without hiding anything. All you need to do is check $network when opening the dialog and then load the settings for that network on init. Yes, you have to close it and re-open it if you want to look at settings for another network, but the OP's first post suggested doing that anyhow.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard