mIRC Homepage
Posted By: Cyber_Axe HOP Delay before rejoin - 16/08/04 03:01 AM
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
Posted By: Naz Re: HOP Delay before rejoin - 16/08/04 11:36 AM
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.
Posted By: Cyber_Axe Re: HOP Delay before rejoin - 16/08/04 11:13 PM
you can use the alias this is a replacement for the origonal, ive done the same with other aliases aswell, thanks tho
Posted By: Seifer Re: HOP Delay before rejoin - 16/08/04 11:22 PM
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.
Posted By: Seifer Re: HOP Delay before rejoin - 16/08/04 11:27 PM
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.
Posted By: Cyber_Axe Re: HOP Delay before rejoin - 17/08/04 02:06 AM
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
Posted By: Iori Re: HOP Delay before rejoin - 17/08/04 07:10 AM
You could try using the -c switch. /!hop -c #channel
Posted By: TonyTheTiger Re: HOP Delay before rejoin - 17/08/04 12:27 PM
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
© mIRC Discussion Forums