habe hier ein google script das geht nicht selber gemacht wenn ich es nicht posten durfte sorry das script ist von SailorCM PS wenn ich es nicht posten durfte könnt ihr es ja löschen
Code:
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'' AnGeL-GoogleScript ''
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'' Version 2.0 ''
'' (C) 2002-2003 SailorCM ''
'' ''
'' Erstellt mit Microsoft Notepad 5.1 2600xpclient.010817-1148 ''
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''' INFO! INFO! INFO! INFO! INFO! INFO! '''''''''''''''
'' ''
'' Dieses Script benutzt die Klassenfähigkeit von VBScript 5.5 ''
'' Möglicherweise wird das Script nicht geladen! ''
'' Bitte sicherstellen, das diese Version installiert ist..... ''
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Dim Connections()
Dim ShowColors
Sub Init()
ReDim Connections(0)
If LongBotVersion < 1060100 Then DontLoadScript "AnGeL-Bot 1.6.1 oder höher benötigt"
If ScriptEngineMajorVersion < 5 Then
DontLoadScript "Scripting Engine 5.5 oder höher benötigt" & ScriptEngineMajorVersion & "." & ScriptEngineMajorVersion
Else
If ScriptEngineMinorVersion < 5 and ScriptEngineMajorVersion = 5 Then
DontLoadScript "Scripting Engine 5.5 oder höher benötigt" & ScriptEngineMajorVersion & "." & ScriptEngineMajorVersion
End If
End If
Script "12G4o8o12g3l4e 2.0 by SailorCM"
SpreadFlagMessage 0, "+m", "3*** 12G4o8o12g3l4e3 2.0 by SailorCM running..."
Hook "Chan_Msg"
End Sub
Sub Chan_msg(Chan, Nick, RegUser, Line)
ShowColors = True
if MatchFlags(Param(ChanMode(ChanNum(chan)),1),"+c") Then ShowColors = False
If LCase(Param(Line,1)) = "!google" Then
If Param(Line,2) <> "" Then
Set Conn = GetConnection
Conn.Nick = Nick
Conn.Chan = Chan
Conn.Word = TranslationTable2(GetRest(Line, 2))
Conn.Tag = "http://www.google.de/search?ie=UTF-8&oe=UTF-8&hl=de&btnI=Auf%20gut%20Gl%FCck!&q=" & Conn.Word
Conn.Parser = "websearch"
Conn.Connect "www.google.de", 80
Else
SendNotice Nick, "Usage: !google <search text>"
End If
ElseIf LCase(Param(Line,1)) = "!googleimg" Then
If Param(Line,2) <> "" Then
Set Conn = GetConnection
Conn.Nick = Nick
Conn.Chan = Chan
Conn.Word = TranslationTable2(GetRest(Line, 2))
Conn.Tag = "http://images.google.de/images?ie=UTF-8&oe=UTF-8&hl=de&btnG=Google-Suche&q=" & Conn.Word
Conn.Parser = "imagesearch"
Conn.Connect "images.google.de", 80
Else
SendNotice Nick, "Usage: !googleimg <search text>"
End If
ElseIf LCase(Param(Line,1)) = "!googleglossary" Then
If Param(Line,2) <> "" Then
Set Conn = GetConnection
Conn.Nick = Nick
Conn.Chan = Chan
Conn.Word = TranslationTable2(GetRest(Line, 2))
Conn.Tag = "http://labs.google.com/glossary?q=" & Conn.Word
Conn.Parser = "glossarysearch"
Conn.Connect "labs.google.com", 80
Else
SendNotice Nick, "Usage: !googleset <search text>"
End If
ElseIf LCase(Param(Line,1)) = "!googleset" Then
If Param(Line,2) <> "" Then
Set Conn = GetConnection
Conn.Nick = Nick
Conn.Chan = Chan
Conn.Word = GetRest(Line, 2)
Conn.Tag = "http://labs.google.com/sets?hl=en&q1=" & Param(Conn.Word,1) & "&q2=" & Param(Conn.Word,2) & "&q3=" & Param(Conn.Word,3) & "&q4=" & Param(Conn.Word,4) & "&q5=" & Param(Conn.Word,5) & "&btn=Large+Set"
Conn.Parser = "setsearch"
Conn.Connect "labs.google.com", 80
Else
SendNotice Nick, "Usage: !googleglossary <search text>"
End If
ElseIf LCase(Param(Line,1)) = "!googlenews" Then
If Param(Line,2) <> "" Then
Set Conn = GetConnection
Conn.Nick = Nick
Conn.Chan = Chan
Conn.Word = GetRest(Line, 2)
Conn.Tag = "http://news.google.de/news?hl=de&q=" & Conn.Word
Conn.Parser = "newssearch"
Conn.Connect "news.google.de", 80
Else
SendNotice Nick, "Usage: !googlenews <search text>"
End If
ElseIf LCase(Param(Line,1)) = "!googlegroup" Then
If Param(Line,2) <> "" Then
Set Conn = GetConnection
Conn.Nick = Nick
Conn.Chan = Chan
Conn.Word = TranslationTable2(GetRest(Line, 2))
Conn.Tag = "http://groups.google.de/groups?hl=de&q=" & Conn.Word & "&sa=N&tab=ng"
Conn.Parser = "groupsearch"
Conn.Connect "groups.google.de", 80
Else
SendNotice Nick, "Usage: !googlegroup <search text>"
End If
ElseIf LCase(Param(Line,1)) = "!googledir" Then
If Param(Line,2) <> "" Then
Set Conn = GetConnection
Conn.Nick = Nick
Conn.Chan = Chan
Conn.Word = TranslationTable2(GetRest(Line, 2))
Conn.Tag = "http://www.google.de/search?hl=de&lr=&ie=UTF-8&q=" & Conn.Word & "&sa=N&tab=id&cat=gwd%2FTop"
Conn.Parser = "dirsearch"
Conn.Connect "www.google.de", 80
Else
SendNotice Nick, "Usage: !googledir <search text>"
End If
End If
End Sub
Function GetConnection
For i = 1 To UBound(Connections)
If Connections(i).vSock = 0 Then
Set Connections(i) = New Connection
Connections(i).Index = i
Set GetConnection = Connections(I)
Exit Function
End If
Next
ReDim Preserve Connections(UBound(Connections) + 1)
i = UBound(Connections)
Set Connections(i) = New Connection
Connections(i).Index = i
Set GetConnection = Connections(I)
End Function
Function TranslationTable(InText)
Dim A(255)
A(128) = "â¬": A(129) = "Â": A(130) = "â": A(131) = "Æ": A(132) = "â": A(133) = "â¦": A(134) = "â ": A(135) = "â¡"
A(136) = "Ë": A(137) = "â°": A(138) = "Å ": A(139) = "â¹": A(140) = "Å": A(141) = "Â": A(142) = "Ž": A(143) = "Â"
A(144) = "Â": A(145) = "â": A(146) = "â": A(147) = "â": A(148) = "â": A(149) = "â¢": A(150) = "â": A(151) = "â"
A(152) = "Ë": A(153) = "â¢": A(154) = "Å¡": A(155) = "âº": A(156) = "Å": A(157) = "Â": A(158) = "ž": A(159) = "Ÿ"
A(161) = "¡": A(162) = "¢": A(163) = "£": A(164) = "¤": A(165) = "¥": A(166) = "¦": A(167) = "§": A(168) = "¨"
A(169) = "©": A(170) = "ª": A(171) = "«": A(172) = "¬": A(173) = "Â": A(174) = "®": A(175) = "¯": A(176) = "°"
A(177) = "±": A(178) = "²": A(179) = "³": A(180) = "´": A(181) = "µ": A(182) = "¶": A(183) = "·": A(184) = "¸"
A(185) = "¹": A(186) = "º": A(187) = "»": A(188) = "¼": A(189) = "½": A(190) = "¾": A(191) = "¿": A(192) = "Ã"
A(193) = "Ã": A(194) = "Ã": A(195) = "Ã": A(196) = "Ã": A(197) = "Ã
": A(198) = "Ã": A(199) = "Ã": A(200) = "Ã"
A(201) = "Ã": A(202) = "Ã": A(203) = "Ã": A(204) = "Ã": A(205) = "Ã": A(206) = "Ã": A(207) = "Ã": A(208) = "Ã"
A(209) = "Ã": A(210) = "Ã": A(211) = "Ã": A(212) = "Ã": A(213) = "Ã": A(214) = "Ã": A(215) = "Ã": A(216) = "Ã"
A(217) = "Ã": A(218) = "Ã": A(219) = "Ã": A(220) = "Ã": A(221) = "Ã": A(222) = "Ã": A(223) = "Ã": A(224) = "Ã "
A(225) = "á": A(226) = "â": A(227) = "ã": A(228) = "ä": A(229) = "å": A(230) = "æ": A(231) = "ç": A(232) = "è"
A(233) = "é": A(234) = "ê": A(235) = "ë": A(236) = "ì": A(237) = "Ã": A(238) = "î": A(239) = "ï": A(240) = "ð"
A(241) = "ñ": A(242) = "ò": A(243) = "ó": A(244) = "ô": A(245) = "õ": A(246) = "ö": A(247) = "÷": A(248) = "ø"
A(249) = "ù": A(250) = "ú": A(251) = "û": A(252) = "ü": A(253) = "ý": A(254) = "þ": A(255) = "ÿ"
TranslationTable = InText
For I = 128 to 255
TranslationTable = Replace(TranslationTable, A(I), CHR(I))
Next
End Function
Function TranslationTable2(InText)
Dim A(255)
A(128) = "â¬": A(129) = "Â": A(130) = "â": A(131) = "Æ": A(132) = "â": A(133) = "â¦": A(134) = "â ": A(135) = "â¡"
A(136) = "Ë": A(137) = "â°": A(138) = "Å ": A(139) = "â¹": A(140) = "Å": A(141) = "Â": A(142) = "Ž": A(143) = "Â"
A(144) = "Â": A(145) = "â": A(146) = "â": A(147) = "â": A(148) = "â": A(149) = "â¢": A(150) = "â": A(151) = "â"
A(152) = "Ë": A(153) = "â¢": A(154) = "Å¡": A(155) = "âº": A(156) = "Å": A(157) = "Â": A(158) = "ž": A(159) = "Ÿ"
A(161) = "¡": A(162) = "¢": A(163) = "£": A(164) = "¤": A(165) = "¥": A(166) = "¦": A(167) = "§": A(168) = "¨"
A(169) = "©": A(170) = "ª": A(171) = "«": A(172) = "¬": A(173) = "Â": A(174) = "®": A(175) = "¯": A(176) = "°"
A(177) = "±": A(178) = "²": A(179) = "³": A(180) = "´": A(181) = "µ": A(182) = "¶": A(183) = "·": A(184) = "¸"
A(185) = "¹": A(186) = "º": A(187) = "»": A(188) = "¼": A(189) = "½": A(190) = "¾": A(191) = "¿": A(192) = "Ã"
A(193) = "Ã": A(194) = "Ã": A(195) = "Ã": A(196) = "Ã": A(197) = "Ã
": A(198) = "Ã": A(199) = "Ã": A(200) = "Ã"
A(201) = "Ã": A(202) = "Ã": A(203) = "Ã": A(204) = "Ã": A(205) = "Ã": A(206) = "Ã": A(207) = "Ã": A(208) = "Ã"
A(209) = "Ã": A(210) = "Ã": A(211) = "Ã": A(212) = "Ã": A(213) = "Ã": A(214) = "Ã": A(215) = "Ã": A(216) = "Ã"
A(217) = "Ã": A(218) = "Ã": A(219) = "Ã": A(220) = "Ã": A(221) = "Ã": A(222) = "Ã": A(223) = "Ã": A(224) = "Ã "
A(225) = "á": A(226) = "â": A(227) = "ã": A(228) = "ä": A(229) = "å": A(230) = "æ": A(231) = "ç": A(232) = "è"
A(233) = "é": A(234) = "ê": A(235) = "ë": A(236) = "ì": A(237) = "Ã": A(238) = "î": A(239) = "ï": A(240) = "ð"
A(241) = "ñ": A(242) = "ò": A(243) = "ó": A(244) = "ô": A(245) = "õ": A(246) = "ö": A(247) = "÷": A(248) = "ø"
A(249) = "ù": A(250) = "ú": A(251) = "û": A(252) = "ü": A(253) = "ý": A(254) = "þ": A(255) = "ÿ"
TranslationTable2 = InText
For I = 128 to 255
TranslationTable2 = Replace(TranslationTable2,CHR(I), A(I))
Next
TranslationTable2 = replace(TranslationTable2, " ","+")
End Function
Function UniCodeTable(codd)
If codd = "100" Then UniCodeTable = "A": Exit Function
If codd = "100" Then
UniCodeTable = "A": Exit Function
ElseIf codd = "101" Then
UniCodeTable = "a": Exit Function
ElseIf codd = "102" Then
UniCodeTable = "A": Exit Function
ElseIf codd = "103" Then
UniCodeTable = "a": Exit Function
ElseIf codd = "104" Then
UniCodeTable = "A": Exit Function
ElseIf codd = "105" Then
UniCodeTable = "a": Exit Function
ElseIf codd = "106" Then
UniCodeTable = "C": Exit Function
ElseIf codd = "107" Then
UniCodeTable = "c": Exit Function
ElseIf codd = "108" Then
UniCodeTable = "C": Exit Function
ElseIf codd = "109" Then
UniCodeTable = "c": Exit Function
ElseIf codd = "10A" Then
UniCodeTable = "C": Exit Function
ElseIf codd = "10B" Then
UniCodeTable = "c": Exit Function
ElseIf codd = "10C" Then
UniCodeTable = "C": Exit Function
ElseIf codd = "10D" Then
UniCodeTable = "c": Exit Function
ElseIf codd = "10E" Then
UniCodeTable = "D": Exit Function
ElseIf codd = "10F" Then
UniCodeTable = "d": Exit Function
ElseIf codd = "110" Then
UniCodeTable = "D": Exit Function
ElseIf codd = "111" Then
UniCodeTable = "e": Exit Function
ElseIf codd = "112" Then
UniCodeTable = "E": Exit Function
ElseIf codd = "113" Then
UniCodeTable = "e": Exit Function
ElseIf codd = "114" Then
UniCodeTable = "E": Exit Function
ElseIf codd = "115" Then
UniCodeTable = "e": Exit Function
ElseIf codd = "116" Then
UniCodeTable = "E": Exit Function
ElseIf codd = "117" Then
UniCodeTable = "e": Exit Function
ElseIf codd = "118" Then
UniCodeTable = "E": Exit Function
ElseIf codd = "119" Then
UniCodeTable = "e": Exit Function
ElseIf codd = "11A" Then
UniCodeTable = "E": Exit Function
ElseIf codd = "11B" Then
UniCodeTable = "e": Exit Function
ElseIf codd = "11C" Then
UniCodeTable = "G": Exit Function
ElseIf codd = "11D" Then
UniCodeTable = "g": Exit Function
ElseIf codd = "11E" Then
UniCodeTable = "G": Exit Function
ElseIf codd = "11F" Then
UniCodeTable = "g": Exit Function
ElseIf codd = "120" Then
UniCodeTable = "G": Exit Function
ElseIf codd = "121" Then
UniCodeTable = "g": Exit Function
ElseIf codd = "122" Then
UniCodeTable = "G": Exit Function
ElseIf codd = "123" Then
UniCodeTable = "g": Exit Function
ElseIf codd = "124" Then
UniCodeTable = "H": Exit Function
ElseIf codd = "125" Then
UniCodeTable = "h": Exit Function
ElseIf codd = "126" Then
UniCodeTable = "H": Exit Function
ElseIf codd = "127" Then
UniCodeTable = "h": Exit Function
ElseIf codd = "128" Then
UniCodeTable = "I": Exit Function
ElseIf codd = "129" Then
UniCodeTable = "i": Exit Function
ElseIf codd = "12A" Then
UniCodeTable = "I": Exit Function
ElseIf codd = "12B" Then
UniCodeTable = "i": Exit Function
ElseIf codd = "12C" Then
UniCodeTable = "I": Exit Function
ElseIf codd = "12D" Then
UniCodeTable = "i": Exit Function
ElseIf codd = "12E" Then
UniCodeTable = "I": Exit Function
ElseIf codd = "12F" Then
UniCodeTable = "i": Exit Function
ElseIf codd = "130" Then
UniCodeTable = "I": Exit Function
ElseIf codd = "131" Then
UniCodeTable = "i": Exit Function
ElseIf codd = "132" Then
UniCodeTable = "IJ": Exit Function
ElseIf codd = "133" Then
UniCodeTable = "ij": Exit Function
ElseIf codd = "134" Then
UniCodeTable = "J": Exit Function
ElseIf codd = "135" Then
UniCodeTable = "j": Exit Function
ElseIf codd = "136" Then
UniCodeTable = "K": Exit Function
ElseIf codd = "137" Then
UniCodeTable = "k": Exit Function
ElseIf codd = "138" Then
UniCodeTable = "k": Exit Function
ElseIf codd = "139" Then
UniCodeTable = "L": Exit Function
ElseIf codd = "13A" Then
UniCodeTable = "l": Exit Function
ElseIf codd = "13B" Then
UniCodeTable = "L": Exit Function
ElseIf codd = "13C" Then
UniCodeTable = "l": Exit Function
ElseIf codd = "13D" Then
UniCodeTable = "L": Exit Function
ElseIf codd = "13E" Then
UniCodeTable = "l": Exit Function
ElseIf codd = "13F" Then
UniCodeTable = "L": Exit Function
ElseIf codd = "140" Then
UniCodeTable = "l": Exit Function
ElseIf codd = "141" Then
UniCodeTable = "L": Exit Function
ElseIf codd = "142" Then
UniCodeTable = "l": Exit Function
ElseIf codd = "143" Then
UniCodeTable = "N": Exit Function
ElseIf codd = "144" Then
UniCodeTable = "n": Exit Function
ElseIf codd = "145" Then
UniCodeTable = "N": Exit Function
ElseIf codd = "146" Then
UniCodeTable = "n": Exit Function
ElseIf codd = "147" Then
UniCodeTable = "N": Exit Function
ElseIf codd = "148" Then
UniCodeTable = "n": Exit Function
ElseIf codd = "149" Then
UniCodeTable = "n": Exit Function
ElseIf codd = "14A" Then
UniCodeTable = "N": Exit Function
ElseIf codd = "14B" Then
UniCodeTable = "n": Exit Function
ElseIf codd = "14C" Then
UniCodeTable = "O": Exit Function
ElseIf codd = "14D" Then
UniCodeTable = "o": Exit Function
ElseIf codd = "14E" Then
UniCodeTable = "O": Exit Function
ElseIf codd = "14F" Then
UniCodeTable = "o": Exit Function
ElseIf codd = "150" Then
UniCodeTable = "O": Exit Function
ElseIf codd = "151" Then
UniCodeTable = "o": Exit Function
ElseIf codd = "152" Then
UniCodeTable = "CE": Exit Function
ElseIf codd = "153" Then
UniCodeTable = "ce": Exit Function
ElseIf codd = "154" Then
UniCodeTable = "R": Exit Function
ElseIf codd = "155" Then
UniCodeTable = "r": Exit Function
ElseIf codd = "156" Then
UniCodeTable = "R": Exit Function
ElseIf codd = "157" Then
UniCodeTable = "r": Exit Function
ElseIf codd = "158" Then
UniCodeTable = "R": Exit Function
ElseIf codd = "159" Then
UniCodeTable = "r": Exit Function
ElseIf codd = "15A" Then
UniCodeTable = "S": Exit Function
ElseIf codd = "15B" Then
UniCodeTable = "s": Exit Function
ElseIf codd = "15C" Then
UniCodeTable = "S": Exit Function
ElseIf codd = "15D" Then
UniCodeTable = "s": Exit Function
ElseIf codd = "15E" Then
UniCodeTable = "S": Exit Function
ElseIf codd = "15F" Then
UniCodeTable = "s": Exit Function
ElseIf codd = "160" Then
UniCodeTable = "S": Exit Function
ElseIf codd = "161" Then
UniCodeTable = "s": Exit Function
ElseIf codd = "162" Then
UniCodeTable = "T": Exit Function
ElseIf codd = "163" Then
UniCodeTable = "t": Exit Function
ElseIf codd = "164" Then
UniCodeTable = "T": Exit Function
ElseIf codd = "165" Then
UniCodeTable = "t": Exit Function
ElseIf codd = "166" Then
UniCodeTable = "T": Exit Function
ElseIf codd = "167" Then
UniCodeTable = "t": Exit Function
ElseIf codd = "168" Then
UniCodeTable = "U": Exit Function
ElseIf codd = "169" Then
UniCodeTable = "u": Exit Function
ElseIf codd = "16A" Then
UniCodeTable = "U": Exit Function
ElseIf codd = "16B" Then
UniCodeTable = "u": Exit Function
ElseIf codd = "16C" Then
UniCodeTable = "U": Exit Function
ElseIf codd = "16D" Then
UniCodeTable = "u": Exit Function
ElseIf codd = "16E" Then
UniCodeTable = "U": Exit Function
ElseIf codd = "16F" Then
UniCodeTable = "u": Exit Function
ElseIf codd = "170" Then
UniCodeTable = "U": Exit Function
ElseIf codd = "171" Then
UniCodeTable = "u": Exit Function
ElseIf codd = "172" Then
UniCodeTable = "U": Exit Function
ElseIf codd = "173" Then
UniCodeTable = "u": Exit Function
ElseIf codd = "174" Then
UniCodeTable = "W": Exit Function
ElseIf codd = "175" Then
UniCodeTable = "w": Exit Function
ElseIf codd = "176" Then
UniCodeTable = "Y": Exit Function
ElseIf codd = "177" Then
UniCodeTable = "y": Exit Function
ElseIf codd = "178" Then
UniCodeTable = "Y": Exit Function
ElseIf codd = "179" Then
UniCodeTable = "Z": Exit Function
ElseIf codd = "17A" Then
UniCodeTable = "z": Exit Function
ElseIf codd = "17B" Then
UniCodeTable = "Z": Exit Function
ElseIf codd = "17C" Then
UniCodeTable = "z": Exit Function
ElseIf codd = "17D" Then
UniCodeTable = "Z": Exit Function
ElseIf codd = "17E" Then
UniCodeTable = "z": Exit Function
ElseIf codd = "17F" Then
UniCodeTable = "z": Exit Function
ElseIf codd = "18F" Then
UniCodeTable = "e": Exit Function
ElseIf codd = "192" Then
UniCodeTable = "f": Exit Function
ElseIf codd = "1A0" Then
UniCodeTable = "O": Exit Function
ElseIf codd = "1A1" Then
UniCodeTable = "o": Exit Function
ElseIf codd = "1AF" Then
UniCodeTable = "U": Exit Function
ElseIf codd = "1B0" Then
UniCodeTable = "u": Exit Function
ElseIf codd = "1CD" Then
UniCodeTable = "A": Exit Function
ElseIf codd = "1CE" Then
UniCodeTable = "a": Exit Function
ElseIf codd = "1CF" Then
UniCodeTable = "I": Exit Function
ElseIf codd = "1D0" Then
UniCodeTable = "i": Exit Function
ElseIf codd = "1D1" Then
UniCodeTable = "O": Exit Function
ElseIf codd = "1D2" Then
UniCodeTable = "o": Exit Function
ElseIf codd = "1D3" Then
UniCodeTable = "U": Exit Function
ElseIf codd = "1D4" Then
UniCodeTable = "u": Exit Function
ElseIf codd = "1D5" Then
UniCodeTable = "ü": Exit Function
ElseIf codd = "1D6" Then
UniCodeTable = "ü": Exit Function
ElseIf codd = "1D7" Then
UniCodeTable = "U": Exit Function
ElseIf codd = "1D8" Then
UniCodeTable = "ü": Exit Function
ElseIf codd = "1D9" Then
UniCodeTable = "Ü": Exit Function
ElseIf codd = "1DA" Then
UniCodeTable = "ü": Exit Function
ElseIf codd = "1DB" Then
UniCodeTable = "Ü": Exit Function
ElseIf codd = "1DC" Then
UniCodeTable = "ü": Exit Function
ElseIf codd = "1FA" Then
UniCodeTable = "A": Exit Function
ElseIf codd = "1FB" Then
UniCodeTable = "a": Exit Function
ElseIf codd = "1FC" Then
UniCodeTable = "AE": Exit Function
ElseIf codd = "1FD" Then
UniCodeTable = "æ": Exit Function
ElseIf codd = "1FE" Then
UniCodeTable = "Ø": Exit Function
ElseIf codd = "1FF" Then
UniCodeTable = "Ø": Exit Function
ElseIf codd = "259" Then
UniCodeTable = "e": Exit Function
ElseIf codd = "2C6" Then
UniCodeTable = "^": Exit Function
ElseIf codd = "2C7" Then
UniCodeTable = "^": Exit Function
ElseIf codd = "2C9" Then
UniCodeTable = "¯": Exit Function
ElseIf codd = "2D8" Then
UniCodeTable = "?": Exit Function
ElseIf codd = "2D9" Then
UniCodeTable = "?": Exit Function
ElseIf codd = "2DA" Then
UniCodeTable = "°": Exit Function
ElseIf codd = "2DB" Then
UniCodeTable = ",": Exit Function
ElseIf codd = "2DC" Then
UniCodeTable = "~": Exit Function
ElseIf codd = "2DD" Then
UniCodeTable = "~": Exit Function
ElseIf codd = "300" Then
UniCodeTable = "`": Exit Function
ElseIf codd = "301" Then
UniCodeTable = "´": Exit Function
ElseIf codd = "303" Then
UniCodeTable = "~": Exit Function
ElseIf codd = "309" Then
UniCodeTable = "'": Exit Function
ElseIf codd = "323" Then
UniCodeTable = ".": Exit Function
ElseIf codd = "37E" Then
UniCodeTable = ";": Exit Function
ElseIf codd = "384" Then
UniCodeTable = "´": Exit Function
ElseIf codd = "385" Then
UniCodeTable = "´": Exit Function
ElseIf codd = "386" Then
UniCodeTable = "´A": Exit Function
ElseIf codd = "387" Then
UniCodeTable = ".": Exit Function
ElseIf codd = "388" Then
UniCodeTable = "´E": Exit Function
ElseIf codd = "389" Then
UniCodeTable = "´H": Exit Function
ElseIf codd = "38A" Then
UniCodeTable = "´I": Exit Function
ElseIf codd = "38C" Then
UniCodeTable = "´O": Exit Function
ElseIf codd = "38E" Then
UniCodeTable = "´Y": Exit Function
ElseIf codd = "38F" Then
UniCodeTable = "_(¯)_": Exit Function
ElseIf codd = "390" Then
UniCodeTable = "t": Exit Function
Else
UniCodeTable = "?": Exit Function
End If
End Function
Sub SendNotice(Destination, Text)
SendLine "NOTICE " & Destination & " :" & Text, 3
End Sub
Sub SendMessage(Destination, Text)
If ShowColors = False Then
SendLine "PRIVMSG " & Destination & " :" & Strip(Text), 3
Else
SendLine "PRIVMSG " & Destination & " :" & Text, 3
End If
End Sub
Class Connection
Public vSock, Nick, Chan, Tag, Index, Word, Parser
Private PDATA
Public Sub Connect(RemoteHost, RemotePort)
Port = RemotePort
vSock = SockConnect(RemoteHost, RemotePort, "Connections(" & Index & ").WindowProc")
End Sub
Public Sub WindowProc(uMsg, wParam, strBuf)
Select Case wParam
Case SE_ConnectFailed
SendNotice Nick, "4*** (12G4o8o12g3l4e) Connection failed...."
vSock = 0
Case SE_Connected
SockWrite vSock, "GET " & Tag & " HTTP/1.0" & vbCrLf & "connection: close" & vbCrLf & vbCrLf
Case SE_Read
PDATA = PDATA & strBuf
If InStr(LCase(PDATA), "</html>") > 0 Then SockClose uMsg: WindowProc uMsg, SE_Closed, ""
Case SE_Closed
Select Case Parser
Case "websearch"
Response = Mid(PDATA, InStr(PDATA,"<A HREF=") + 9)
Response = Mid(Response, 1,InStr(Response, Chr(34)) -1 )
If InStr(Response, "200 OK") > 0 Then
SendMessage Chan, "*** 12G4o8o12g3l4e WebSearch: Es wurden keine mit Ihrer Suchanfrage - " & TranslationTable2(Word) & " - übereinstimmenden Dokumente gefunden."
Else
SendMessage Chan, "*** 12G4o8o12g3l4e WebSearch: " & Response
End If
Case "imagesearch"
If InStr(PDATA, "Es wurden keine ") > 0 or Instr(PDATA,"Meinten Sie") > 0 Then
SendMessage Chan, "*** 12G4o8o12g3l4e ImageSearch: Es wurden keine mit Ihrer Suchanfrage - " & TranslationTable2(Word) & " - übereinstimmenden Bilder gefunden."
Else
Response = Mid(PDATA, InStr(PDATA,"/imgres?imgurl=") + 15)
Response = Mid(Response, 1,InStr(Response, "&imgrefurl") -1 )
SendMessage Chan, "*** 12G4o8o12g3l4e ImageSearch: http://" & Response
End If
Case "glossarysearch"
If InStr(PData,"Sorry, there are no definitions for") > 0 then
SendMessage Chan, "*** 12G4o8o12g3l4e GlossarySearch: Es wurden keine mit Ihrer Suchanfrage - " & TranslationTable2(Word) & " - übereinstimmenden Glossary-Einträge gefunden."
Else
Response = Mid(PDATA, InStr(PDATA,"<li>") + 4)
Response = Mid(Response, 1,InStr(Response, "<br>") -1 )
If Len(Response) > 400 Then
For i = 1 to ((Len(Response) / 400)+1)
On Error Resume Next
RET = Mid(Response,((I-1)*400)+1,((I)*400))
If not Ret = "" Then
SendMessage Chan, "*** 12G4o8o12g3l4e GlossarySearch(Teil: " & I & "): " & Ret
End If
On Error Goto 0
Next
Else
SendMessage Chan, "*** 12G4o8o12g3l4e GlossarySearch: " & Response
End If
End If
Case "setsearch"
If InStr(PData,"Zero or only a few results") > 0 then
SendMessage Chan, "*** 12G4o8o12g3l4e SetSearch: Es wurden keine mit Ihrer Suchanfrage - " & TranslationTable2(Word) & " - übereinstimmenden Set's gefunden."
Else
PDATA = Replace(PDATA,"%20"," ")
RESP = Split(PDATA, "<font face=""Arial, sans-serif"" size=-1><a href=""http://www.google.com/search?hl=en&q=")
For I = 1 To UBound(RESP)
RESP(I) = Mid(RESP(I), 1, InStr(RESP(I), Chr(34)) - 1)
Next
RESP(0) = ""
SendMessage Chan, "*** 12G4o8o12g3l4e SetSearch: " & Join(RESP," - ")
End If
Case "newssearch"
If InStr(PData,"Es wurden keine mit Ihrer Suchanfrage") > 0 or Instr(PDATA,"Meinten Sie") > 0 then
SendMessage Chan, "*** 12G4o8o12g3l4e SetSearch: Es wurden keine mit Ihrer Suchanfrage - " & TranslationTable2(Word) & " - übereinstimmenden NEWS gefunden."
Else
Response = Mid(PDATA, InStr(PDATA,"</a></font></td></tr></table><br><div><a href=") + 46)
Response = Mid(Response, 1,InStr(Response, ">") -1 )
SendMessage Chan, "*** 12G4o8o12g3l4e NewsSearch: " & Response
End If
Case "dirsearch"
If InStr(PData,"Es wurden keine mit Ihrer Suchanfrage") > 0 or Instr(PDATA,"Meinten Sie") > 0 then
SendMessage Chan, "*** 12G4o8o12g3l4e SetSearch: Es wurden keine mit Ihrer Suchanfrage - " & TranslationTable2(Word) & " - übereinstimmenden Verzeichnisse gefunden."
Else
Response = Mid(PDATA, InStr(PDATA,"le><div><p class=g>") + 19)
Response = Mid(Response, InStr(Response, "<a href=") +8 )
Response = Mid(Response, 1,InStr(Response, ">") -1 )
SendMessage Chan, "*** 12G4o8o12g3l4e DirectorySearch: " & Response
End If
Case "groupsearch"
If InStr(PData,"Es wurden keine mit Ihrer Suchanfrage") > 0 or Instr(PDATA,"Meinten Sie") > 0 then
SendMessage Chan, "*** 12G4o8o12g3l4e SetSearch: Es wurden keine mit Ihrer Suchanfrage - " & TranslationTable2(Word) & " - übereinstimmenden Gruppen gefunden."
Else
Response = Mid(PDATA, InStr(PDATA,"</a></font></td></tr></table><div><p>") + 45)
Response = Mid(Response, 1, InStr(Response, ">") -1 )
SendMessage Chan, "*** 12G4o8o12g3l4e GroupSearch: http://groups.google.de" & Response
End If
End Select
End Select
End Sub
End Class