mIRC Home    About    Download    Register    News    Help

Print Thread
#121232 25/05/05 09:47 AM
Joined: May 2005
Posts: 106
S
Vogon poet
OP Offline
Vogon poet
S
Joined: May 2005
Posts: 106
hey i would like if someone could make a serach where i type (in mirc) /dictionary <word> i.e. /dictionary test and then it opens up a window in internet explorer and goes to this website searching for test http://dictionary.reference.com
the search for test would be http://dictionary.reference.com/search?q=test


and thats the way the scout leader burns
#121233 25/05/05 10:28 AM
Joined: Dec 2004
Posts: 11
D
Pikka bird
Offline
Pikka bird
D
Joined: Dec 2004
Posts: 11
try

Code:
alias dictionary {
  //run http://dictionary.reference.com/search?q= $+ $1 }


may not be the greatest method, but should work.

#121234 25/05/05 11:35 AM
Joined: May 2005
Posts: 106
S
Vogon poet
OP Offline
Vogon poet
S
Joined: May 2005
Posts: 106
so wat paste it in remotes??? or aliases and then wat do i type to use this script confused confused


and thats the way the scout leader burns
#121235 25/05/05 11:38 AM
Joined: May 2005
Posts: 449
Fjord artisan
Offline
Fjord artisan
Joined: May 2005
Posts: 449
Paste it in aliases and the you'd type /dictionary script (or whatever word you want to look for)

Last edited by bwr30060; 25/05/05 11:39 AM.
#121236 25/05/05 11:40 AM
Joined: May 2005
Posts: 106
S
Vogon poet
OP Offline
Vogon poet
S
Joined: May 2005
Posts: 106
i did wat u said and this is the msg i got

DICTIONARY Unknown command


and thats the way the scout leader burns
#121237 25/05/05 11:41 AM
Joined: May 2005
Posts: 449
Fjord artisan
Offline
Fjord artisan
Joined: May 2005
Posts: 449
I just looked at that script again and spotted a possible problem. Tell me if I'm wrong, I'm new at this. You're using the $1 identifier, which could be a problem with multiple word dictionary entries like "tennis court". Should that be changed to $1- ? Hope that helps.

#121238 25/05/05 11:43 AM
Joined: May 2005
Posts: 106
S
Vogon poet
OP Offline
Vogon poet
S
Joined: May 2005
Posts: 106
i changed it to $1- and i got the same msg saying

DICTIONARY Unknown command

i typed /dictionary test


and thats the way the scout leader burns
#121239 25/05/05 11:43 AM
Joined: May 2005
Posts: 449
Fjord artisan
Offline
Fjord artisan
Joined: May 2005
Posts: 449
When you paste it into your aliases, change this line:

alias dictionary {

to this:

/dictionary {

That should work. (Keep the $1- though, that solves another problem)

Last edited by bwr30060; 25/05/05 11:45 AM.
#121240 25/05/05 11:45 AM
Joined: May 2005
Posts: 106
S
Vogon poet
OP Offline
Vogon poet
S
Joined: May 2005
Posts: 106
yes that worked thanks alot for ur help


and thats the way the scout leader burns
#121241 25/05/05 11:59 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
for future refrence, if someone uses
alias blah {
lines of code here
}

that must be placed in a REMOTE TAB file
* it has the word "alias" on the front so the remotres system knows its an alias not a remote.

if you see it as "blah {" or "/blah {" as in...
blah {
lines of code here
}

then it is placed in an ALIASES TAB file

There is no difference between them, besides that from memory if u have 2 named the same the one in the alieses file is located first, unless its a local alias i beleive.

#121242 27/05/05 06:14 AM
Joined: Jan 2003
Posts: 87
T
Tat Offline
Babel fish
Offline
Babel fish
T
Joined: Jan 2003
Posts: 87
I coded a bot that used a feature like that, although just running the site would probably be the best thing to do. This bot checked all the words people used and corrected any spelling. As expected I quickly turned it off as highly annoying.

Code:
on *:TEXT:*:#mychan:{ check.spelling $1- }
on *:Input:#mychan:{ check.spelling $1- }
alias check.spelling {
  if ($1 == !help) { .timer 1 0 msg $chan !ignore &lt;ignoreword&gt;, !coff, !con, !nocorrect, !correct | return }
  if ($1 == !ignore) { write ignore.txt $2 | .timer 1 0 msg $chan the word " $+ $2 $+ " will be ignored from now on. | return }
  if ($1 == !coff) { %nocorrect = $true | .timer 1 0 msg $chan Correct Bot Off. | return }
  if ($1 == !con) { unset %nocorrect | .timer 1 0 msg $chan Correct Bot On. | return }
  if ((%nocorrect) || ($1- != $strip($1-))) { return }
  if ($1 == !nocorrect) { %donotcorrect = %donotcorrect $nick | .timer 1 0 msg $chan You won't be corrected. | return }
  if ($1 == !correct) { %donotcorrect = $remove(%donotcorrect,$nick) | .timer 1 0 msg $chan You will now be corrected. | return }
  if ($nick isin %donotcorrect) { return }
  var %sents = $remove($strip($1-),.,?,:,;,",*,&amp;,^,%,$,#,@,!,'s,'ll,'ve",1,2,3,4,5,6,7,8,9,0,+,_,/,\,$chr(44)), %i = $numtok(%sents,32)
  var %sents = $replace(%sents,-,$chr(32))
  while (%i &gt;= 1) {
    if (!$read(ignore.txt, s, $gettok(%sents,%i,32))) do.check.word $gettok(%sents,%i,32)
    dec %i
  }
}
alias word.site { return http://dictionary.reference.com/search?q= $+ $1 }
alias httpparse {
  if ($regex($1-, http:\/\/(?:(?:[^:]+)(?::(?:.+))?@)?([^/]*)(\/.*) )) {
    if ($prop == site) return $regml(1)
    if ($prop == file) return $regml(2)
  }
}
alias do.check.word {
  var %spelling.sock = spelling. $+ $1
  if ($sock(%spelling.sock)) { return }
  sockopen %spelling.sock $httpparse($word.site($1)).site 80
  sockmark %spelling.sock $word.site($1)
}
on *:SOCKOPEN:spelling.*: {
  if ($sock($sockname)) {
    sockwrite -n $sockname GET $httpparse($sock($sockname).mark).file HTTP/1.1
    sockwrite -n $sockname Host: $httpparse($sock($sockname).mark).site
    sockwrite -n $sockname Connection: Keep-Alive
    sockwrite -n $sockname $crlf
  }
}
on *:SOCKREAD:spelling.*: {
  var %d, %link, %info
  sockread %d
  if (%d == $null) { return }
  if (&lt;td&gt;&lt;h2 style="margin-bottom: 2em;"&gt;* entr* found for &lt;i&gt;*&lt;/i&gt;.&lt;/h2&gt; iswm %d) {  }
  if (&lt;p&gt;Did you mean &lt;a href="*"&gt;*&lt;/a&gt;?&lt;/p&gt;* iswm %d) if ($regex(%d,/Did\syou\smean\s\&lt;a[^\&gt;]*\&gt;([^\&lt;]*)\&lt;\/a\&gt;/)) msg #mychan " $+ $remove($sockname,spelling.) $+ " is not a word, $gettok($insult, $rand(1,$numtok($insult,$asc(.))), $asc(.)) $+ . Did you mean: $regml(1) $+ ?
}
alias insult { return moron.idiot.gimp.smegma chewer.dumbsh!t.reject.f_ckhead.darwin disproof.retard.dumber than chalk.Andromeda watcher.silly goose.brainless git.used car salesperson.liver lover }
 


3 references to #mychan need to be changed I suppose.


Link Copied to Clipboard