Hotlink for search returns

By yelow79 on Nov 13, 2011

What this does is it turns any line that contains (/msg ), "/msg ", (/ctcp ), and "/ctcp " into a clickable link that will return whatever is between either ( and ) or between the two sets of quotation marks.

Load in remotes to use

Thank you to Jethro for helping me understand how ON HOTLINKS work, and thank you to Ford_Lawnmower for assistance with the regex.

menu channel,menubar,status {
  Search Trigger confirm
  .set $iif(%stconfirm == on,OFF,ON):{
    set %stconfirm $iif(%stconfirm == on,off,on)
    echo 3 -a Search trigger confirmation popup is now %stconfirm
  }
}
;******************************************************************************************************
; Hotlink for search routines
;******************************************************************************************************
;
on ^*:hotlink:*:*: { 
  var %Hlink.SS = /[\x28"]\/((ctcp|msg).*)[\x29"]/Si
  if ($regex($hotline,%Hlink.SS)) { return }
  halt
}

on *:hotlink:*:*: {
  if ($regex($hotline,%Hlink.SS)) { 
    $iif(%stconfirm == on, $?!="Do you want to request this packet? $crlf $+ You can turn this Confirmation off by clicking. $crlf $+ mIRC>Search Trigger confrim>set off", $regml(1)) 
  }
}

;******************************************************************************************************
; Alias Section
;******************************************************************************************************
;
alias -l $true if ($regex($hotline,%Hlink.SS)) $regml(1)
alias -l $false echo 4 -a You have chosen to not request the pack from the bot!

Comments

Sign in to comment.
Frenetic   -  Nov 15, 2011

I know lol, but thanks anyway.

 Respond  
yelow79   -  Nov 15, 2011

I have not come accross any bots that use either dcc or notice.

This should work for you frenetic. Just change this line

 var %Hlink.SS = /[\x28"]\/((ctcp|msg).*)[\x29"]/Si 

To

 var %Hlink.SS = /[\x28"]\/((ctcp|dcc|notice|msg).*)[\x29"]/Si 
 Respond  
Frenetic   -  Nov 15, 2011

You have ctcp/msg, why not dcc and notice?

 Respond  
SReject   -  Nov 15, 2011

Tested, and working; my version

menu channel,menubar,status {
  Search Trigger Confirm
  .$iif(%stconfirm == 1,Disable,Enable):{
    set %stconfirm $iif(%stconfirm,0,1)
    echo 3 -a Search trigger confirmation popup is now $iif(%stconfirm,enabled.,disabled.)
  }
}

on ^*:hotlink:*:*:if ($regline) return | halt

on *:hotlink:*:*: {
  if ($regline) {
    if (%stconfirm && $?!="Do you want to request this packet?$&
      $crlf $+ You can turn this confirmation off by clicking:$&
      $crlf $+ mIRC > Search Trigger Confirm > Set off") || (!%stconfirm) {
      $regml(1)
    }
    elseif (%stconfirm) {
      echo 4 -a You have chosen to not request the pack from the bot!
    }
  }
}
alias -l regline return $regex($hotline,/[\("]\/((ctcp|msg).+)[\)"]/Si)
 Respond  
SReject   -  Nov 15, 2011

writing $true and $false...that's interesting

 Respond  
yelow79   -  Nov 13, 2011

Thank you [85]

 Respond  
[85]   -  Nov 13, 2011

interesting thing...

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.