anviska commented on a Page, Twitter Stream  -  Mar 15, 2014

Hi. Looks like a great script. I just seem to have this problem after setting all up and turning the script on. I get this warning "* /bread: insufficient parameters (line 121, twitter.mrc)" and the ssl connection does not open, I guess it's because of that error. What am I doing wrong? Thanks!

anviska  -  Mar 15, 2014

A little update: It's working now! But I still do get that error. Do you know what's it about?

FordLawnmower  -  Mar 15, 2014

@anviska I'm guessing your error is coming from line 126 and you have removed the credits from the top of the script.

bread $sockname 0 $file($sockname).size &mTwitterGetStatus

If this is the case, the problem might not be in the script, but rather your machine not keeping up with the script.
Since this error is occurring inside the on sockclose event, the file $sockname has already been written.
This error is being triggered because $file($sockname).size is returning $null (In other words, the file doesn't exist.

It's my guess that your machine may be delaying file writes for some reason, causing the file to still be unwritten after the script has already told your machine to write it.
Possible causes: Under powered machine being asked to do too much | Slow ide hard drive | mIRC is set at too low of a priority.
I've never seen this error or had it reported, so this is just a guess based on the knowledge of how the script works.
Change the priority of mIRC :
Change the on sockclose event to this:

On *:sockclose:mTwitterGetStatus: {
  if ($file($sockname).size) {
    bread $sockname 0 $file($sockname).size &mTwitterGetStatus
    var %mcount 1
    while ($bintween(&mTwitterGetStatus,{"created_at":,"source":,%mcount)) {
      var %tweetinfo $v1, %userinfo $bintween(&mTwitterGetStatus,"user":{,"location":,%mcount)
      noop $regex(%tweetinfo,/"id_str":"(.*?)"\x2c"text":"(.*)"/i)
      if (!$hget(mirctwitter,Last_ID)) hadd mirctwitter Last_ID 1
      if ($regml(1) > $hget(mirctwitter,Last_ID)) { hadd -m mirctwitter Last_ID $regml(1) }
      var %id $regml(1), %tweet $regml(2)
      noop $regex(%userinfo,/"screen_name":"(.*)"/i)
      var %screenname $regml(1)
      inc %mcount
      var %Method $hget(mIRCTwitter,Method)
      if (%Method == echo -at) { %Method $fix&#($+(09<07,%screenname,09>04) %tweet) }
      elseif ($me ison $gettok(%Method,3,32)) {
        .timer 1 $gettok($sock($sockname).mark,5,32) $gettok(%Method,2-,32) $fix&#($+(09<07,%screenname,09>04) %tweet)
      else {
        if (!$window(@Twitter)) { window -E @Twitter }
        var %NextTweet $fix&#($+(09<07,%screenname,09>04) %tweet) 02,08[04RT02]
        aline -p @Twitter $timestamp %NextTweet
        if ($istok(%NextTweet,$MyTwitterScreenName,32)) {
          if (!$window($MyTwitterScreenName)) { window -E $MyTwitterScreenName }
          aline -p $MyTwitterScreenName $timestamp %NextTweet
          noop $tip(%screenname,Twitter $MyTwitterScreenName,%NextTweet,60,,,,)
    .remove $sockname

note The on sockclose event starts at line 125 and ends at line 154
This assumes that the script is intact an the credits have not been removed.

anviska  -  Mar 15, 2014

Sorry! I'm so noob at these things. I wasn't sure if the first lines were part of the script so I didn't copy/paste them. If they do no harm, I'll put them right back. Thank you for your quick reply. I'll try your advices.

FordLawnmower  -  Mar 15, 2014

No worries @anviska . It just makes it easier to point to the correct line when editing.
If everyone's line one is different, then it's hard to have a discussion and understand each other.

anviska  -  Mar 15, 2014

@FordLawnmower it works perfectly now! thanks again.

anviska  -  Mar 16, 2014

@FordLawnmower sorry to bother you again. The channel I'm using in Quakenet has +r from time to time. This means no colours are allowed which means the tweets are not shown either. Is there any way I could drop the colour codes from the tweets?

Sign in to comment

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.