mIRC Home    About    Download    Register    News    Help

Print Thread
#130700 21/09/05 12:32 AM
Joined: Feb 2003
Posts: 26
M
MRN Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Feb 2003
Posts: 26
I'm having problem with sending favicon.ico to a webbrowser (Opera). It seems that I can't send it.

Code:
  if (%get) { 
    var -s %page $right(%get,$calc($len(%get) - 1))
    var -s %page2 $gettok(%page,1,32)
    if (%page2) { 
      if (%get == /favicon.ico) { 
        if ($exists($mircdirstats\favicon.ico )) { 
          echo -s Trying to send favicon.ico
          sockwrite idle.c $mircdirstats\favicon.ico 
        }
      }
    }
  }


and in status window

Code:
*** Set %page to favicon.ico
*** Set %page2 to favicon.ico
Trying to send favicon.ico


What should the /sockwrite command be?

Perhaps the .ico is invalid, and that's why Opera won't accept it? How to confirm that?

Joined: Feb 2003
Posts: 26
M
MRN Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Feb 2003
Posts: 26
This code is working well.

Code:
    if (%get == /favicon.ico) { 
      if ($exists($mircdirstats\favicon.ico )) { 
        echo -s Trying to send favicon.ico

        bread d:\mirc\stats\favicon.ico 0 224 &fav
        sockwrite idle.c &fav 
        sockclose idle.c
        return done | halt
      }
    }


The use of "/bread file 0 -1 %binvar" didn't work for me, so I used the fixed filesize.


Link Copied to Clipboard