mIRC Home    About    Download    Register    News    Help

Print Thread
HOP Delay before rejoin #94388 16/08/04 03:01 AM
Joined: Dec 2002
Posts: 60
C
Cyber_Axe Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Dec 2002
Posts: 60
ive programed a script using the wnd.dll as part of it tho i think it may be impossible however if anyone knows how to do it please help

Code:
;Rejoin Channel after a delay
alias hop {
  set %CS.DoNotCloseChannel True

  if ($1 == $null) {
    var %CS.ActiveChanTemp $active
    part %CS.ActiveChanTemp
    .timer $+ $server $+ $active 1 3 join %CS.ActiveChanTemp
  }
  else {
    part $1-
    .timer $+ $server $+ $1 1 3 join $1
  }
}

alias Rejoin {
  hop $1-
}

;Return the wnd.dll's location
alias WindowDLL {
  return $findfile($scriptdir,wnd.dll,1).shortfn
}

;this is the signal used by the dll
on *:SIGNAL:Wnd: {

  ;Create @WindowDLL if Non-Existent 
  if ($window(@WindowDLL) == $null) {
    window @WindowDLL
    echo $color(info) @WindowDLL * This Window Displays all output sent by the Window DLL - $csversion
  }

  ;Output all Information from Window DLL to @WindowDLL
  if ($3 != $null) {
    echo @WindowDLL * 2Event Name: $1 4Window HWND: $2  3Event Specific: $3-
  }
  else {
    echo @WindowDLL * 2Event Name: $1 4Window HWND: $2
  }

  if ($1 == tryclose) {
    if (%CS.DoNotCloseChannel == True) {
      unset %CS.DoNotCloseChannel
      dll $WindowDLL release $2
    }
    else {
      CloseHook $2
    }
  }
}

;on Join Identify Channel with Window DLL
on ME:*:JOIN:#: {
  dll $WindowDLL hook $window($chan).hwnd
}

alias CloseHook {
  dll $WindowDLL close $1
}


the problem seems to be tho is that when it tries to join the channel mIRC thinks you never left the channel and so doesnt join where it should join thers a refresh that implies it rejoined however if you try to message (depends on the channel modes and network) i get a server message saying no external messages allowed prooving that you are indeed not in the channel, plus the nicklist doesnt clear when the window parts

Re: HOP Delay before rejoin #94389 16/08/04 11:36 AM
Joined: Feb 2003
Posts: 67
N
Naz Offline
Babel fish
Offline
Babel fish
N
Joined: Feb 2003
Posts: 67
I don't know dll's however one thing caught my attention... You have one alias named 'hop' and since /hop is already an mirc command you cannot use it as such. Possibly renaming that alias to something different may help.


Those who live by the sword get shot by those who don't.
Re: HOP Delay before rejoin #94390 16/08/04 11:13 PM
Joined: Dec 2002
Posts: 60
C
Cyber_Axe Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Dec 2002
Posts: 60
you can use the alias this is a replacement for the origonal, ive done the same with other aliases aswell, thanks tho

Re: HOP Delay before rejoin #94391 16/08/04 11:22 PM
Joined: Nov 2003
Posts: 228
S
Seifer Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Nov 2003
Posts: 228
You can replace any mIRC command or identifier by making an alias for it. You can return the default command with ! though.

alias hop { echo -a Hop! }
/hop
Sends "Hop!" to the active channel.

/!hop
Uses the default /hop command.

Re: HOP Delay before rejoin #94392 16/08/04 11:27 PM
Joined: Nov 2003
Posts: 228
S
Seifer Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Nov 2003
Posts: 228
I tried a few things last night to work around the problem you're having. The only way I found that you can rejoin a channel after parting it is by typing /!hop in the window itself.

Re: HOP Delay before rejoin #94393 17/08/04 02:06 AM
Joined: Dec 2002
Posts: 60
C
Cyber_Axe Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Dec 2002
Posts: 60
thanks, managed to get it half working iwith that works for if you just type /hop in the current channel however not if you type hope in one channel to rejoin another

Re: HOP Delay before rejoin #94394 17/08/04 07:10 AM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
You could try using the -c switch. /!hop -c #channel

Re: HOP Delay before rejoin #94395 17/08/04 12:27 PM
Joined: Feb 2004
Posts: 124
T
TonyTheTiger Offline
Vogon poet
Offline
Vogon poet
T
Joined: Feb 2004
Posts: 124
Quote:
You can replace any mIRC command or identifier


True for built-in mIRC commands .. not true for built-in mIRC identifiers.

/help custom identifiers
Note: Built-in identifiers of the same name have priority.

Edit: btw .. I like the signature smile

Last edited by TonyTheTiger; 17/08/04 12:53 PM.