DirtProxyHelper
#NewScriptBegin DirtProxyHelper Dim FilePath Dim DirtStarted Dim ChanList Sub Load() DirtStarted=Val(Load("DirtProxyStarted")) 'List of Channels: '(Syntax: ConnList="+<CONNECTION>/<CHANNEL>/<KEY> +<CONNECTION>/<CHANNEL>/<KEY> +<CONNE...") ChanList="+Nettalk1/#Nettalk/KHM9854KSVNYSxx +Nettalk1/#bots/KHM7454KKVNYSch" 'To get the correct string you can type the following line in your channel: '?Input("Text:", "+"+GetVal(FrontConID,4)+"/"+GetCaption(FrontFrameID)+"/"+input("Key:")) 'Path of the dirt.exe: FilePath="C:\Programme\Dirt\dirt.exe" End Sub Sub AppLoad() DirtStarted=0 End Sub Sub Serv_Connect(ConnID) If InStr(1, ChanList, "+" & GetVal(ConnID,4) & "/", 1) > 0 Then if DirtStarted=0 Then print "~ starting Dirt...", GetStateFrame(ConnID) Send "/ShellApp " & FilePath, 1 DirtStarted=1 else print "~ Dirt is started", GetStateFrame(ConnID) end if SetProxy "127.0.0.1", 1088, ConnID End if End Sub Sub Chan_Join(Nick, Channel, FrameID, ConnID) if Nick = GetVal(ConnID, 5) Then Dat = "+" & GetVal(ConnID,4) & "/" & Channel & "/" i = InStr(1, ChanList, Dat, 1) If i > 0 Then i2=InStr(i, ChanList, " ") if i2=0 Then i2=Len(ChanList)+1 i=i+Len(Dat) echo i, i2, Len(ChanList) Send "//dirt SetKey " & Channel & " " & Mid(ChanList, i, i2-i), FrameID end if End if End Sub Sub Unload() Save "DirtProxyStarted", DirtStarted End Sub
Sie befinden sich hier: start » nettalk » scripting » dirtproxyhelper