RJosh

RJosh

Joined
Nov 30, 2009
Occupation
I shoot things.
Location
ON, Canada

Activity Stream

RJosh commented on a mIRC Script, upLoad  -  Jan 08, 2013

To anyone who still uses this: redownload the zip file, this is a working update. Any thing older than this simply won't work for pastebin.com (pastebin.com is no longer public access to the api, so it's been removed entirely, and mpaste.com has been added)

 Respond  
RJosh commented on a mIRC Script, SharkIRC (Beta)  -  Aug 22, 2011

"[@] Auron956: Wow, I downloaded a script from Hawkee to have a look at it. The uploader has included his personal logs in with the script..."

I wouldn't advise keeping your personal notes within the script you're going to upload.

A friend of mine located them.

 Respond  
RJosh commented on a mIRC Script, upLoad  -  May 15, 2011

Never left, just forgot my password haha!

 Respond  
RJosh commented on a mIRC Script, upLoad  -  May 14, 2011

I will consider it depending on other observations given in time.

 Respond  
RJosh commented on a mIRC Script, upLoad  -  May 13, 2011

I will eventually be adding a feature to either

A) Save links of your old posts and check them when clicked on and collect the data posted and display it, or remove the link from your history if it's been deleted.
B) Allows you to supply a link and it will collect the data posted from the link and display it, or tell you if it's been deleted.

 Respond  
RJosh created a mIRC Script  -  May 13, 2011
RJosh commented on a Page, Binary to ASCII  -  Dec 20, 2009

I'm more then positive this was purely so he didn't have to use base. $base is for people who don't know math :)

Just kidding of course it's just a way to experiment, as most scripts are.

 Respond  
RJosh commented on a Page, Binary to ASCII  -  Dec 19, 2009

Just a suggestion, the use of global variables should be used. Locals would have sufficed.

Also for longtintoascii, in the if instead of needing to use calc just use

if (8 \\ $len($1)) { echo -sa * /longbintoascii SyntaxError: Invalid Input | return }

aswell as for your binary2ascii all those if statements could be avoided using a simple loop.

var %a = 1,%b
while ($mid($1,%a,1) != $null) {
  inc %b $calc( $v1 * 2 ^ ( 8 - %a ) )
  inc %a
}
var %t = $+(%t,$iif($chr(%b) == $chr(32),$str($chr(1),3),$v1)
var %b

If you don't like the multiple chr(1)'s in place of spaces you can do it another way that's suitable for you, i simply chose that cause well, it's very unlikely that there will be 3 chr(1)'s consecutive in a string being processed.

Same goes for your ascii2binary

var %a = 1,%b = 1
while ($asc($mid($1-,%a,1)) != $null) {
  var %x = $v1
  while (%x > 0) {
    var %y = $iif(2 \\ $v1,1,0) $+ %y,%x = $floor($calc(%x / 2))
  }
  var %bin = $+(%bin,$str(0,$calc(8 - $len(%y))),%y)
  inc %a
}

Here are my versions of your code:

/*
*   Binary -> Decimal
*/
todec {
  if (8 // $len($$1-)) {
    noop $regex(dec,$$1-,/([01]{8})/g)
    var %a = 1,%b,%t
    while ($regml(dec,%a)) {
      var %c = 1,%d = $v1
      while ($mid(%d,%c,1) != $null) {
        inc %b $calc( $v1 * 2 ^ ( 8 - %c ) )
        inc %c
      }
      var %t = $+(%t,$iif($chr(%b) != $chr(32),$v1,$str($chr(1),3)))
      var %b
      inc %a
    }
    return $replace(%t,$str($chr(1),3),$chr(32))
  }
  return
}
/*
*   Decimal -> Binary
*/
binary {
  var %a = $len($1-)
  while (%a) {
    var %b = $tobin($asc($mid($1-,%a,1))) $+ %b    
    dec %a
  }
  return %b
}
tobin {
  var %x = $1-
  while (%x > 0) {
    var %y = $iif(2 \\ %x,1,0) $+ %y
    var %x = $floor($calc(%x / 2))
  }
  return $+($str(0,$calc(8- $len(%y))),%y)
}
 Respond  
RJosh commented on a Page, .NET GetTok() - mIRC Function  -  Dec 17, 2009

hehe yea me too. But $gettok is inherited from $token if i'm not mistaken, so all functions of $token were transfered over including the 0 function. It made more sense using it with $token then it does with $gettok though.

 Respond  
RJosh commented on a Page, .NET GetTok() - mIRC Function  -  Dec 17, 2009

Why can't token by a 0? A 0 should return the total amount of tokens if you're planning on replicating the actual $gettok method from mIRC.

Other then that good job. I've been working on something similar in C#, never got around to finishing.

 Respond  
RJosh commented on a Page, unReal IRC Theme Engine  -  Dec 15, 2009

not sure if silo just typo'd or not, but he forgot the Dialog ID. Not to mention you need to use a line NUMBER with the -c flag. Not a string of text.

 Respond  
RJosh commented on a Page, unReal IRC Theme Engine  -  Dec 12, 2009

@scakk: just use a regular if statement if there is no else return.

Other then that it looks okay. good job.

 Respond  
RJosh commented on a Page, A real non-ripped /whois  -  Dec 11, 2009

I like getting double whois results too man. Also that may work on your server that you generally visit, but probably won't work on other networks as some of them use different raws within their whois and don't use others.

 Respond  
RJosh commented on a Page, $caps Identifier  -  Dec 08, 2009

ah very well jethro_ i didn't think of that. and yes nice catch indeed sunslayer

 Respond  
RJosh commented on a Page, IRC Bot  -  Dec 08, 2009

By interpreter i hope you mean python.exe which is the COMMAND LINE for python.

The interpreter that comes with it (IE: IDLE) is a piece of garbage. running things through the command line is much cleaner and easier.

 Respond  
RJosh commented on a Page, Highlight logger  -  Dec 07, 2009

lmao a hash tray. nice fordlawnmower

 Respond  
RJosh commented on a Page, $caps Identifier  -  Dec 07, 2009

@Sunslayer;

$regsubex($1-,/(\w)(.+?)(\W)/g,$+($upper(\1),$lower(\2),\3))

will capitalize the first letter and make the rest of the word lowercase for each word which looks better imo

I'm not really sure why you had to use (.+)(\W|\b). You should have only needed two backreferences at most.

alias _upper return $regsubex($1-,/(\w)(\w+)/g,$upper(\1) $+ $lower(\2))
 Respond  
RJosh commented on a Page, Highlight logger  -  Dec 07, 2009

Yea, but hash tables are faster :>.

And i just rather them to variables (personal preference).

 Respond  
RJosh commented on a Page, Highlight logger  -  Dec 07, 2009

Personally i wouldn't have even used regex at all. At the upmost i would have done something like.

on *:TEXT:$(* $me $+ ? *):*:{
  if (!$window(@HighlightLog)) { window -ez @HighLightLog }
  if (!$hget(HLFlood $+ $network,$wildsite)) { 
    hadd -mz $+(HLFlood,$network) $wildsite 30
    aline -hi20 @HighlightLog Highlight - $nick ( $+ $wildsite $+ ) - $+($iif(#,#,Query),@,$network) - $timestamp $$1-
  }
}

The reason i would use hashtables is because if you EXIT mIRC the variables are left in the VAR tab if the unset isn't triggered. Atleast hash tables are deleted automatically when you EXIT unless you have a method of saving them on exit. If you do you can simple exclude them from your method. That's just my two cents.

 Respond  
RJosh commented on a Page, Bot Theme  -  Dec 06, 2009

You may want to update your intro since the script no longer writes to bot\data* and writes to the directory the file was loaded from.

 Respond  
RJosh commented on a Page, Scripting Identifiers  -  Dec 06, 2009

By depreciated i mean replaced by another identifier. ofcourse it's still usable. just most people don't have all the undocumented features ;)

 Respond  
RJosh commented on a Page, PHPTok  -  Dec 06, 2009

Oh, right. thanks sunslayer.

Also, i'm aware it doesn't work for negative ranges. because that was the only part i didn't account for in my old function. and i'm too lazy to test it. :D

 Respond  
RJosh commented on a Page, PHPTok  -  Dec 06, 2009

It doesn't look like you have support for ranges or negative values.

IE:
gettok("hello there what's up",2-3," ") -> there what's
gettok("hello there what's up",-1," ") -> up

Maybe something you could look into. I had made a gettok that supported ranges a while back. i'll try and find it or remake it .

EDIT:

I took the liberty of doing my best to remake what i had and this is what i came up with.

function gettok($string,$n,$c) {
        if(is_numeric($c)) {
            $c = chr($c);
        }
        $tok = explode($c,$string);
        if($n==0) {
            return count($tok);
        }
        if($n < 0) {
            $n = count($tok)-$n;
        }
        if(@preg_match("#(\d+)-(\d+)?#",$n,$range)) {
            $text = "";
            if(count($range[1])==1) {
                $r1 = $range[1][0]-1;
                $r2 = count($tok);
            }   else    {
                $r1 = $range[1][0]-1;
                $r2 = $range[1][1];
            }
            while($r1<$r2) {
                $text .= $tok[$r1];
                $r1++;
            }
            return $text;
        }
        if(empty($tok[$n-1])) {
            return FALSE;
        }   else    {
            return $tok[$n-1];
        }
    }
 Respond  
RJosh commented on a Page, mask()  -  Dec 02, 2009

It's possible. But you would still need to check which mask type is required to get the right format. Plus i prefer native modules to importing the regex module when you don't need it.

 Respond  
RJosh commented on a Page, iTunes Class (iTclass)  -  Dec 02, 2009

If it was it's news to me. But I Highly doubt it. This is just a COM snippet made in python to get the current track information.

 Respond  
RJosh created a Page  -  Dec 02, 2009
556 

I had an idea of making a lyrics GUI for iTunes and the current track. I got as far as making the object to retrieve the info and get the lyrics, and then stopped.

RJosh created a Page  -  Dec 02, 2009
973 

I started working on a PyBot for IRC and needed a way to filter some things and needed a masking function that i couldn't find for USERS and HOSTS.

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.