IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası

IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası (https://www.ircforumlari.net/)
-   Eggdrop, NeoStats, BNC (https://www.ircforumlari.net/eggdrop-neostats-bnc/)
-   -   aciL tcl Lazım (https://www.ircforumlari.net/eggdrop-neostats-bnc/446933-acil-tcl-lazim.html)

Stroom 26 Ocak 2012 23:04

aciL tcl Lazım
 
# Text flood (lines) warn msg.
set textl(wmsg) "Uyarı: Uzun Yazı kurallara aykırıdır, devamınız halinde uzaklaştırılacaksınız."


set textc(wmsg) "Uyarı: *Çok uzun yazı* kurallara aykırıdır! Devamınız halinde uzaklaştırılacaksınız."

# Notice flood (lines) warn msg.
set noticel(wmsg) "Uyarı: Notice Flood yapmayınız! Devamınız halinde uazkalaştırılacaksınız."



bunu Normel bi tcl olarak bot'a eklemek istiyorum bot'da oto ban sistemi var zaten , ama atmadan önce 2 kez uyarsın istiyorum.

Heartbroken 26 Ocak 2012 23:20

Cevap: aciL tcl Lazım
 
bu Sir_Fz'nin all protection scriptinin ayar kısmının bir bölümü ...

ancak en son versionu değil ve Türkçe'leştirilmiş .. Benim hatırladığım istediğiniz warn reply özelliği son version'da [Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...] vardı...

Stroom 26 Ocak 2012 23:38

Cevap: aciL tcl Lazım
 
türkcesini bulamazmıyım bunun

Heartbroken 26 Ocak 2012 23:46

Cevap: aciL tcl Lazım
 
bu yanlış hatırlamıyorsam geçen sene yazında çıkmıştı.sanmıyorum benim bildiğim yok.sadece uyarı ve atma mesajlarını çevirseniz -değişseniz yeterli ..

Heartbroken 26 Ocak 2012 23:53

Cevap: aciL tcl Lazım
 
çeviren kendine çevirmiştir herhalde çünkü paylaşıldığını Türk sitelerinde ben görmedim.

ama koruma scriptleri içinde en popüler-revaçta olan birkaç scriptten biri ..en azından en günceli* diyebilirim....yabancı kaynaklı kodlar içersinde*...

IUC 27 Ocak 2012 21:18

Cevap: aciL tcl Lazım
 
gökçe ben çevirip kendi sunucum denedim ancak bir randıman alamadım bir tuhaf çalışıyor nedense (eggdrop 1.6.21 (de)

Heartbroken 28 Ocak 2012 02:03

Cevap: aciL tcl Lazım
 
ilk versionu mayıs 2005'de yayınlanmış o tarihten beri 65 sayfa forum sayfasında [Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...] konuşulmuş.

Tuhaf derken nasıl tuhaf yani ? :d

aslında mantık olarak 1.6.21'de daha temiz iyi çalışması gerekir [Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...] çünkü önceki sürümde görülen pek çok bug giderildi..

[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]

IUC 28 Ocak 2012 13:42

ingilizce versiyonunuda sorunsuz çevirisini yaptığım türkçe versiyonuda bir tuhaf çalışıuyor birçalışıyor bir çalışmıyor bazen çatır çatır çalışıyor bazende ulan şu herifin yazdığı komut satırını acaba uygulasammmııııı uygulamasmmı modunda düşünüo eggdrop 21 i kendi sunucuma (local) ubuntu 11 in altına kurdum sonuç gene aynı biliyorum dikkat edersen o forumda benimde postlarım olacak dur bakalım kafamın rahat oldugu anda birdaha deneeyceğim hatta e hatta tclyi birde macera olsun diye amigada çalışan eggdrop ta denemem lazım:)

ayrıca eggdropun ilkçıktıgı günden beri bütün versiyonları (diğer platformlarda dahil) örneek amiga 4000'ümün o/s 3.9 altında çalışan en her [Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...] dökümanları ile mevcut bir ara pearl altında çalışan eggdropları da hem derlemiş hemde denemiştim yanisenin anlayacağın her eggdropu ve tcl file i ayrı platformlarda deniyorum dur bakalım bir defa daha denerim baktım çalışmıyor direk rm :)

Heartbroken 28 Ocak 2012 15:11

Cevap: aciL tcl Lazım
 
7 sene de pek çok versionu bu script için çıkarmış .forumda yazılan eleştiri-önerilere göre hataları gidere gidere.ondan sağlam birşey olmalı,kullananı baya çok orda görüldüğü kadarıyla..

sizde olan tcl arşivim içinde bunun gibi komple koruma tcl'leri vardı ..hepsinin adı aklımda değil şimdi ama aklımda kalan superscript vardı protection vardı.lol.tcl vardı ..daha en az 5-6 tane daha bu tarz koruma tcl scriptleri vardı.. genelde dalnet-efnet'te kullanılan scriptlerdi.

boyutu büyük olanları bir kontrol edin.hepsi bunun gibi uzun diğerlerine göre büyük boyutluydular..onlarıda deneyebilirsiniz.

Burda allprotection'dan bahsetmemin nedeni Stroom bunun bir parçasını ilk yazdığında postalamıştı.tanıdım kodları..

Stroom 30 Ocak 2012 20:09

Cevap: aciL tcl Lazım
 
yok yok :) bunun çevirisinide yaptım ama benim çeviri işe yaramadı eksik verdi sanırım

Stroom 30 Ocak 2012 20:36

Cevap: aciL tcl Lazım
 
## Request script with pointsystem by jlykkegaard@[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...].com
## This script was made for my own enjoyment, and for learning TCL!
## I dont think there exist a request script, with or without point system, thats why i decided to go public with my script!
## All the text is in danish, so unless you are from denmark translating it to english would be a good idea
## If you decide to translate it, please upload the new version to the tcl archive( we are here to help each other out, right?)
## There are probarly bugs, and the script is not good documented, so if some scripters out there feels like making it 100% correct it would be great!
## One know bug is that it is having a hard time with people with \ in their names, but that should be easy to fix
## you should replace #req in this script with your channel name
## Then add the users with !reguser
## then registered users can do !addreq
## To see the list of reqeusts, you should use a webbrowser, and connect to port 8002
## To customize my script, and make it work great some basic tcl understanding is required, i do not claim this is a perfect script!
## I just think it has potential, and someone out there could make it great!
## This Script Has Been Translated Into English By Country|Rocker :))

bind pub - !request requests
bind pub - !requests requests
bind pub - !addreq addreq
bind pub - !addreg addreq
bind pub - !addrequest addreq
bind pub - !delreq delreq
bind pub - !Hjælp commands
bind pub - !setftp setftp
bind pub - !getftp getftp
bind pub - !ftp getftp
bind pub - !help commands
bind pub - !regnick regnick
bind pub - !reguser reguser
bind pub - !disablenotify disablenotify
bind pub - !enablenotify enablenotify
bind pub - !point showpoints
bind pub - !points showpoints
bind pub - !setpoint setpoints
bind pub - !setpoints setpoints
bind pub - !updatechan updatechan
bind pub - !changehandle changehandle
bind pub - !GiveAllAPoint GiveAllAPoint
bind pub - !showpoints showallpoints

bind join * * onjoin

set http(port) "8002"
set http(port2) "8003"


if {![info exists http(socket2)]} {
socket -server httpserver2 $http(port2)
set http(socket2) 1
}

if {![info exists http(socket)]} {
socket -server httpserver $http(port)
set http(socket) 1
}

proc updatechan {nick uhost hand chan arg} {
resetchan $chan
}

proc changehandle {nick uhost hand chan arg} {
chhandle [lindex $arg 0] [lindex $arg 1]
putserv "PRIVMSG $chan :Handle Changed!"

}


proc GiveAllAPoint {nick uhost hand chan arg} {
if {[matchattr [mynick2hand $nick $chan] o|o $chan]} {

set splitteddata [userlist X]
for { set number 0 } { $number < [llength $splitteddata ] } { incr number } {

set newpoint [expr [getuser [lindex $splitteddata $number] XTRA point]+1]
setuser [lindex $splitteddata $number] XTRA Point $newpoint

}
puthelp "PRIVMSG $chan :Done"
} else {
puthelp "PRIVMSG $chan :Forget That, Only @,! Can!"
}
}


proc setpoints {nick uhost hand chan arg} {
if {[matchattr [mynick2hand $nick $chan] o|o $chan]} {

if {([onchan [lindex $arg 0] $chan]==0) && ([validuser [lindex $arg 0]]==0) } {
putserv "PRIVMSG $chan :User Not Found!"
} else {
setuser [mynick2hand [lindex $arg 0] $chan] XTRA Point [lindex $arg 1]
putserv "PRIVMSG $chan :Point Set!"

}
} else {
putserv "PRIVMSG $chan :$nick Your Balls Aint Big Enough To Do That!"
}

}



proc showpoints {nick uhost hand chan arg} {

if {$arg==""} {
putserv "PRIVMSG $chan :You Have [getuser [mynick2hand $nick $chan] XTRA point] Points!"
} else {

if {([onchan $arg $chan]==0) && ([validuser [lindex $arg 0]]==0) } {
putserv "PRIVMSG $chan :User Not Found"
} else {
putserv "PRIVMSG $chan :[mynick2hand $arg $chan] Have [getuser [mynick2hand $arg $chan] XTRA point] Points!"

}


}
}

proc onjoin {nick uhost hand chan} {
if {[nick2hand $nick $chan]!="*"} {
putserv "NOTICE $nick :Hello and Welcome To #req [mynick2hand $nick $chan]! You Have [getuser [mynick2hand $nick $chan] XTRA point] Points!"

} else {
putserv "NOTICE $nick :$nick Your Host Mask Was Not Recognized, Please Identify You To The Bottom! To Do This, Write /msg |reqbot| auth ditpassword"
}
}

proc enablenotify {nick uhost hand chan arg} {
if {[nick2hand $nick $chan]!="*"} {

chattr $nick |\-X \#req
putserv "NOTICE $nick :Enabled!"
} else {
putserv "NOTICE $nick :You Are Not Added To The Bottom!"
}

}


proc disablenotify {nick uhost hand chan arg} {
if {[nick2hand $nick $chan]!="*"} {

chattr $nick |\+X \#req
putserv "NOTICE $nick :Disabled!"
} else {
putserv "NOTICE $nick :You Are Not Added To The Bottom!"
}

}


proc reguser {nick uhost hand chan arg} {
if {[nick2hand $arg $chan]=="*"} {

if {[matchattr [nick2hand $nick $chan] o|o $chan]} {
adduser $arg [maskhost [getchanhost $arg $chan]]
chattr $arg |\+v \#req
chattr $arg \+X
setuser [nick2hand $arg $chan] XTRA Point 5

putserv "PRIVMSG $chan :User Added!"
putserv "NOTICE $arg :$arg: Write /msg |Reqbot| pass indsætditpassher To Put Your Password, It Is Recommended Especially If You Have a Changing Ip, So That The Bot Can Identify You From a Different Host Mask!"
} else {
putserv "PRIVMSG $chan :$nick Your Balls Aint Big Enough To Do That!"
}
resetchan $chan
} else {
putserv "PRIVMSG $chan :$arg Is Already Registered!"

}
}




proc commands {nick uhost hand chan arg} {
if {[nick2hand $nick $chan]!="*"} {

set chancmds {
"THE REQUEST SCRIPT COMMANDS"
"!help <nick> <-- sends the command list to the specified nick"
"!disablenotift <-- turn's OFF notice messages from the request commands"
"!enablenotify <-- turn's ON notice messages from the request commands"
"!addreq <-- adds a request! example: !addreq Dj_skør_vandballong_-_haha-cda-dk-2004-PATTAH (2004-10-05)"
"!delreq <number> <-- deletes the request"
"!request <-- shows url to reqsite"
"!setftp <-- sets your ftp string/addline example: [Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]@[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...].har.en.ftpp.dk:1337"
"!getftp <nick> <-- lists the <nick's> ftp addline/sting"
"THE OTHER COMMANDS"
"!rules <-- displays the rules of req"
"!rules <nick> <-- sends the rules to the specified nick"
"!imdb <movietitle> <-- shows url to imdb.com's review of the movie"
"!seen <nick> <-- displays when the nick last was seen in the channel examples: !seen p0nk, !seen p0* "
"THAT'S ALL DUDE...."
}

if {$arg != ""} {

if {[onchan $arg $chan]} {
puthelp "PRIVMSG $arg :Watch and Learn!"
foreach line $chancmds { puthelp "PRIVMSG $arg :$line" }
} else {
puthelp "PRIVMSG $nick :Nick Not Found!"
}

} else {
foreach line $chancmds {puthelp "PRIVMSG $nick :$line" }
}
} else {
putserv "PRIVMSG $chan :You Are Not Added To The Bottom!"
}

}

proc httpserver {s ipaddr port} {
fconfigure $s -blocking 0 -buffering line
gets $s x
set i 0
set info($i) $x
incr i
while {$i<20} {
gets $s info($i)
incr i
}
unset i

puts $s "\
HTTP/1.1 200 OK\n\
Server: Eggdrop http server\n\
Connection: close\n\
Content-Type: text/html; charset=iso-8859-1\n\
Cache-Control: no-cache; no-store; max-age=0\n\
Pragma: no-cache\n\n\n\
<html>\n\
<head>\n\
</head>\n\
<body style=\"font-family: fixedsys\">\n\
<table>\n\
<tr>\n\
<td><b>Number:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b></td><td><b>Request:</b></td><td><b>User Nick:</b></td><td><b>Date Established:</b></td><td><b>Point:</b></td>\n\
</tr>\n\
"

set rf [open "requests.txt" r]
fconfigure $rf -translation binary
fconfigure $s -translation binary
puts $s "[read $rf]"
close $rf

puts $s "\
</body>
</html>
"

close $s
}




proc httpserver2 {s ipaddr port} {
fconfigure $s -blocking 0 -buffering line
gets $s x
set i 0
set info($i) $x
incr i
while {$i<20} {
gets $s info($i)
incr i
}
unset i

puts $s "\
HTTP/1.1 200 OK\n\
Server: Eggdrop http server\n\
Connection: close\n\
Content-Type: text/html; charset=iso-8859-1\n\
Cache-Control: no-cache; no-store; max-age=0\n\
Pragma: no-cache\n\n\n\
<html>\n\
<head>\n\
</head>\n\
<body style=\"font-family: fixedsys\">\n\
"


set splitteddata [userlist X]
for { set number 0 } { $number < [llength $splitteddata ] } { incr number } {

puts $s [lindex $splitteddata $number]
puts $s [getuser [lindex $splitteddata $number] XTRA Point]
puts $s "<BR>"
}

puts $s "\
</body>
</html>
"

close $s
}





proc addreq {nick uhost hand chan arg} {
set isregged false

if {[nick2hand $nick $chan]!="*"} {

if {[string match -nocase *|* $arg]!=0} {
if {[string is integer -strict [lindex [split $arg "|"] 1] ]!=0} {
set point [lindex [split $arg "|"] 1]
set arg [lindex [split $arg "|"] 0]

if { ([expr [getuser [mynick2hand $nick $chan] XTRA Point] - $point > -1]) && ([expr $point > 0]) } {

setuser [mynick2hand $nick $chan] XTRA point [expr [getuser [mynick2hand $nick $chan] XTRA Point] - $point]

######## FIND NEXT NUMBER!!!!!!!!!!!!!!!
set fp [open "requests.txt" r]
set data [read $fp]
close $fp
set datasplitted [split $data "\n"]
set nextnumber 0
for { set number 1 } { $number < [expr [llength $datasplitted]+1] } { incr number } {
if {[string match -nocase *#$number* $datasplitted]==0} {
if {$nextnumber==0} {
set nextnumber $number
}
}
}

######### ADD VERY REQUEST

set fp [open "requests.txt" r]
set data [read $fp]
close $fp

set data [split $data "\n"]
set fid [open requests.txt a]
fconfigure $fid -buffering line
set current_date [strftime "%b %d %Y %H:%M" [expr [clock seconds] - 86400]]
regsub "#" $arg "%" arg
puts $fid "<tr><td>#$nextnumber</td><td>$arg</td><td>[nick2hand $nick $chan]</td><td>$current_date</td><td>$point<td></tr>"
close $fid
putserv "PRIVMSG $chan :- \[NEW REQUEST\]-\[\0037$arg\003\]-\[ADDED BY\]-\[\0037[nick2hand $nick $chan]\003\]-\[NR\]-\[\0037#$nextnumber\003\]-\[DATE\]-\[\0037$current_date\003\]"
putserv "PRIVMSG $chan :Request Added, Sending Notices!"
foreach line [chanlist $chan] {
if {![matchattr $line |X $chan]} {
# putserv "NOTICE $line :- \[NEW REQUEST\]-\[\0037$arg\003\]-\[ADDED BY\]-\[\0037[nick2hand $nick $chan]\003\]-\[NR\]-\[\0037#$nextnumber\003\]-\[DATE\]-\[\0037$current_date\003\]"
}
}

} else {

putserv "PRIVMSG $chan :Sorry That You Do Not Have Enough Points!"
}


} else {

putserv "PRIVMSG $chan :Number Of Points Must Be Greater !"
}

} else {
putserv "PRIVMSG $chan :You Must Enter Score, It Makes You. By Writing !addreq Request|1 It Will Put 1 Point On Request!"
}
} else {
putserv "PRIVMSG $chan :You Are Not Added To Bottom!"
}
}




proc requests {nick uhost hand chan arg} {
if {[nick2hand $nick $chan]!="*"} {

putserv "PRIVMSG $chan :4http://IPTOBOT:8002/"
} else {
putserv "PRIVMSG $chan :User Not Added To Bottom!"
}

}


proc showallpoints {nick uhost hand chan arg} {
if {[nick2hand $nick $chan]!="*"} {

putserv "PRIVMSG $chan :4http://IPTOBOT:8003/"
} else {
putserv "PRIVMSG $chan :You Are Not Added To Bottom!"
}

}



proc delreq {nick uhost hand chan arg} {
regsub "#" $arg "" arg
set error "false"
set deleted "false"
if {[nick2hand $nick $chan]!="*"} {







if {[string match -nocase *|* $arg]!=0} {



set reward [lindex [split $arg "|"] 1]
set arg [lindex [split $arg "|"] 0]

if {[isnumber $arg]} {



if {([validuser $reward]) || ([onchan $reward $chan]!=0) } {

set fp [open "requests.txt" r]
set data [read $fp]
close $fp
set data [split $data "\n"]

set fs [open "requests.txt" w]


for { set number 0 } { $number < [expr [llength $data]-1] } { incr number } {
set currline [lindex $data $number]
if {([string match -nocase *#[lindex $arg 0]* $currline]!=1) } {
puts $fs $currline
} else {

if {[string match -nocase *<td>[nick2hand $nick $chan]</td>* $currline]==1} {

set deleted "true"
set tempsplit [lindex [split $currline ">"] 4]
set point [lindex [split $currline ">"] 10]

regsub "<td" $point "" Point


putserv "PRIVMSG $chan :Requester Was At $point Point, It Has Now Received $reward, and He Has Now[expr [getuser [mynick2hand $reward $chan] XTRA Point] + $point ] Point!"
setuser [mynick2hand $reward $chan] XTRA point [expr [getuser [mynick2hand $reward $chan] XTRA Point] + $point ]

} else {
puts $fs $currline
}
}

}
close $fs
} else {
putserv "PRIVMSG $chan :The User You Want To Give Points To Does Not Exist!"
set error "true"
}
} else {
putserv "PRIVMSG $chan :Invalid Number Entered!"
set error "true"
}






} else {
set error "true"
putserv "PRIVMSG $chan :You Must Specify Who Should Have Points, It Makes You Know, For Example. Write! delreq 23|filler, It Will Remove The Request 23, and Give Points To The User With The Nickname filler. If Your Requests Have Not Been Filled But Just Have To Be Removed Should You Write Your Own Nickname!"
set valid "false"
}







} else {
set error "true"
putserv "PRIVMSG $chan :You Are Not Added To The Bottom!"
}

if {($error=="false") && ($deleted=="false")} {
putserv "PRIVMSG $chan :Requester Was Not Removed, It May Not Be You Who Created It?"

}

if {$deleted=="true"} {
regsub "</td" $tempsplit "" tempsplit

putserv "PRIVMSG $chan :Requesten\0037 $tempsplit (#[expr [lindex $arg 0]])\003 Has Been Deleted "

}



}


proc mynick2hand {nick chan} {
if {[nick2hand $nick $chan]==""} {
set result $nick
} else {
set result [nick2hand $nick $chan]
}
if {$result=="*"} {
set result ""
}
return $result
}

proc getftp {nick uhost hand chan arg} {
if {[nick2hand $nick $chan]!="*"} {

set ftpstring "[getuser [mynick2hand $arg $chan] XTRA ftp]"
if {$ftpstring!=""} {
putserv "NOTICE $nick :$ftpstring"
} else {
putserv "NOTICE $nick :The User Has Not Entered Any PUBLIC Available Information, Try To Ask Him/Her Instead!"
}
} else {
putserv "PRIVMSG $chan :You Are Not Added To Bottom!"
}

}


proc setftp {nick uhost hand chan arg} {
if {[nick2hand $nick $chan]!="*"} {

setuser [nick2hand $nick $chan] XTRA ftp $arg
putserv "NOTICE $nick :Your FTPstring Set!"
} else {
putserv "PRIVMSG $chan :You Are Not Added To Bottom!"
}

}



Şunu türkceleşdirseniz ya :d

IUC 01 Şubat 2012 23:51

Cevap: aciL tcl Lazım
 
dur acele etme stroom elim rahatlayınca onuda çalıştırıcam allahın izniyle :) var ufak bi sakatlığı gözüme takılan kodları dün sabahın 6 sında yarı uykulu inceledim gözüme ufak tefek noktalar takıldı bazı gereksiz noktaları var....

IUC 02 Şubat 2012 00:15

Cevap: aciL tcl Lazım
 
Eğer sabaha kadar işlerim biterse ve uyuyakalmassam yardımcı olmaya çalışırım .selamlar

Alıntı:

Stroom Nickli Üyeden Alıntı (Mesaj 1041015344)
## Request script with pointsystem by jlykkegaard@[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...].com
## This script was made for my own enjoyment, and for learning TCL!
## I dont think there exist a request script, with or without point system, thats why i decided to go public with my script!
## All the text is in danish, so unless you are from denmark translating it to english would be a good idea
## If you decide to translate it, please upload the new version to the tcl archive( we are here to help each other out, right?)
## There are probarly bugs, and the script is not good documented, so if some scripters out there feels like making it 100% correct it would be great!
## One know bug is that it is having a hard time with people with \ in their names, but that should be easy to fix
## you should replace #req in this script with your channel name
## Then add the users with !reguser
## then registered users can do !addreq
## To see the list of reqeusts, you should use a webbrowser, and connect to port 8002
## To customize my script, and make it work great some basic tcl understanding is required, i do not claim this is a perfect script!
## I just think it has potential, and someone out there could make it great!
## This Script Has Been Translated Into English By Country|Rocker :))

bind pub - !request requests
bind pub - !requests requests
bind pub - !addreq addreq
bind pub - !addreg addreq
bind pub - !addrequest addreq
bind pub - !delreq delreq
bind pub - !Hjælp commands
bind pub - !setftp setftp
bind pub - !getftp getftp
bind pub - !ftp getftp
bind pub - !help commands
bind pub - !regnick regnick
bind pub - !reguser reguser
bind pub - !disablenotify disablenotify
bind pub - !enablenotify enablenotify
bind pub - !point showpoints
bind pub - !points showpoints
bind pub - !setpoint setpoints
bind pub - !setpoints setpoints
bind pub - !updatechan updatechan
bind pub - !changehandle changehandle
bind pub - !GiveAllAPoint GiveAllAPoint
bind pub - !showpoints showallpoints

bind join * * onjoin

set http(port) "8002"
set http(port2) "8003"


if {![info exists http(socket2)]} {
socket -server httpserver2 $http(port2)
set http(socket2) 1
}

if {![info exists http(socket)]} {
socket -server httpserver $http(port)
set http(socket) 1
}

proc updatechan {nick uhost hand chan arg} {
resetchan $chan
}

proc changehandle {nick uhost hand chan arg} {
chhandle [lindex $arg 0] [lindex $arg 1]
putserv "PRIVMSG $chan :Handle Changed!"

}


proc GiveAllAPoint {nick uhost hand chan arg} {
if {[matchattr [mynick2hand $nick $chan] o|o $chan]} {

set splitteddata [userlist X]
for { set number 0 } { $number < [llength $splitteddata ] } { incr number } {

set newpoint [expr [getuser [lindex $splitteddata $number] XTRA point]+1]
setuser [lindex $splitteddata $number] XTRA Point $newpoint

}
puthelp "PRIVMSG $chan :Done"
} else {
puthelp "PRIVMSG $chan :Forget That, Only @,! Can!"
}
}


proc setpoints {nick uhost hand chan arg} {
if {[matchattr [mynick2hand $nick $chan] o|o $chan]} {

if {([onchan [lindex $arg 0] $chan]==0) && ([validuser [lindex $arg 0]]==0) } {
putserv "PRIVMSG $chan :User Not Found!"
} else {
setuser [mynick2hand [lindex $arg 0] $chan] XTRA Point [lindex $arg 1]
putserv "PRIVMSG $chan :Point Set!"

}
} else {
putserv "PRIVMSG $chan :$nick Your Balls Aint Big Enough To Do That!"
}

}



proc showpoints {nick uhost hand chan arg} {

if {$arg==""} {
putserv "PRIVMSG $chan :You Have [getuser [mynick2hand $nick $chan] XTRA point] Points!"
} else {

if {([onchan $arg $chan]==0) && ([validuser [lindex $arg 0]]==0) } {
putserv "PRIVMSG $chan :User Not Found"
} else {
putserv "PRIVMSG $chan :[mynick2hand $arg $chan] Have [getuser [mynick2hand $arg $chan] XTRA point] Points!"

}


}
}

proc onjoin {nick uhost hand chan} {
if {[nick2hand $nick $chan]!="*"} {
putserv "NOTICE $nick :Hello and Welcome To #req [mynick2hand $nick $chan]! You Have [getuser [mynick2hand $nick $chan] XTRA point] Points!"

} else {
putserv "NOTICE $nick :$nick Your Host Mask Was Not Recognized, Please Identify You To The Bottom! To Do This, Write /msg |reqbot| auth ditpassword"
}
}

proc enablenotify {nick uhost hand chan arg} {
if {[nick2hand $nick $chan]!="*"} {

chattr $nick |\-X \#req
putserv "NOTICE $nick :Enabled!"
} else {
putserv "NOTICE $nick :You Are Not Added To The Bottom!"
}

}


proc disablenotify {nick uhost hand chan arg} {
if {[nick2hand $nick $chan]!="*"} {

chattr $nick |\+X \#req
putserv "NOTICE $nick :Disabled!"
} else {
putserv "NOTICE $nick :You Are Not Added To The Bottom!"
}

}


proc reguser {nick uhost hand chan arg} {
if {[nick2hand $arg $chan]=="*"} {

if {[matchattr [nick2hand $nick $chan] o|o $chan]} {
adduser $arg [maskhost [getchanhost $arg $chan]]
chattr $arg |\+v \#req
chattr $arg \+X
setuser [nick2hand $arg $chan] XTRA Point 5

putserv "PRIVMSG $chan :User Added!"
putserv "NOTICE $arg :$arg: Write /msg |Reqbot| pass indsætditpassher To Put Your Password, It Is Recommended Especially If You Have a Changing Ip, So That The Bot Can Identify You From a Different Host Mask!"
} else {
putserv "PRIVMSG $chan :$nick Your Balls Aint Big Enough To Do That!"
}
resetchan $chan
} else {
putserv "PRIVMSG $chan :$arg Is Already Registered!"

}
}




proc commands {nick uhost hand chan arg} {
if {[nick2hand $nick $chan]!="*"} {

set chancmds {
"THE REQUEST SCRIPT COMMANDS"
"!help <nick> <-- sends the command list to the specified nick"
"!disablenotift <-- turn's OFF notice messages from the request commands"
"!enablenotify <-- turn's ON notice messages from the request commands"
"!addreq <-- adds a request! example: !addreq Dj_skør_vandballong_-_haha-cda-dk-2004-PATTAH (2004-10-05)"
"!delreq <number> <-- deletes the request"
"!request <-- shows url to reqsite"
"!setftp <-- sets your ftp string/addline example: [Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]@[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...].har.en.ftpp.dk:1337"
"!getftp <nick> <-- lists the <nick's> ftp addline/sting"
"THE OTHER COMMANDS"
"!rules <-- displays the rules of req"
"!rules <nick> <-- sends the rules to the specified nick"
"!imdb <movietitle> <-- shows url to imdb.com's review of the movie"
"!seen <nick> <-- displays when the nick last was seen in the channel examples: !seen p0nk, !seen p0* "
"THAT'S ALL DUDE...."
}

if {$arg != ""} {

if {[onchan $arg $chan]} {
puthelp "PRIVMSG $arg :Watch and Learn!"
foreach line $chancmds { puthelp "PRIVMSG $arg :$line" }
} else {
puthelp "PRIVMSG $nick :Nick Not Found!"
}

} else {
foreach line $chancmds {puthelp "PRIVMSG $nick :$line" }
}
} else {
putserv "PRIVMSG $chan :You Are Not Added To The Bottom!"
}

}

proc httpserver {s ipaddr port} {
fconfigure $s -blocking 0 -buffering line
gets $s x
set i 0
set info($i) $x
incr i
while {$i<20} {
gets $s info($i)
incr i
}
unset i

puts $s "\
HTTP/1.1 200 OK\n\
Server: Eggdrop http server\n\
Connection: close\n\
Content-Type: text/html; charset=iso-8859-1\n\
Cache-Control: no-cache; no-store; max-age=0\n\
Pragma: no-cache\n\n\n\
<html>\n\
<head>\n\
</head>\n\
<body style=\"font-family: fixedsys\">\n\
<table>\n\
<tr>\n\
<td><b>Number:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b></td><td><b>Request:</b></td><td><b>User Nick:</b></td><td><b>Date Established:</b></td><td><b>Point:</b></td>\n\
</tr>\n\
"

set rf [open "requests.txt" r]
fconfigure $rf -translation binary
fconfigure $s -translation binary
puts $s "[read $rf]"
close $rf

puts $s "\
</body>
</html>
"

close $s
}




proc httpserver2 {s ipaddr port} {
fconfigure $s -blocking 0 -buffering line
gets $s x
set i 0
set info($i) $x
incr i
while {$i<20} {
gets $s info($i)
incr i
}
unset i

puts $s "\
HTTP/1.1 200 OK\n\
Server: Eggdrop http server\n\
Connection: close\n\
Content-Type: text/html; charset=iso-8859-1\n\
Cache-Control: no-cache; no-store; max-age=0\n\
Pragma: no-cache\n\n\n\
<html>\n\
<head>\n\
</head>\n\
<body style=\"font-family: fixedsys\">\n\
"


set splitteddata [userlist X]
for { set number 0 } { $number < [llength $splitteddata ] } { incr number } {

puts $s [lindex $splitteddata $number]
puts $s [getuser [lindex $splitteddata $number] XTRA Point]
puts $s "<BR>"
}

puts $s "\
</body>
</html>
"

close $s
}





proc addreq {nick uhost hand chan arg} {
set isregged false

if {[nick2hand $nick $chan]!="*"} {

if {[string match -nocase *|* $arg]!=0} {
if {[string is integer -strict [lindex [split $arg "|"] 1] ]!=0} {
set point [lindex [split $arg "|"] 1]
set arg [lindex [split $arg "|"] 0]

if { ([expr [getuser [mynick2hand $nick $chan] XTRA Point] - $point > -1]) && ([expr $point > 0]) } {

setuser [mynick2hand $nick $chan] XTRA point [expr [getuser [mynick2hand $nick $chan] XTRA Point] - $point]

######## FIND NEXT NUMBER!!!!!!!!!!!!!!!
set fp [open "requests.txt" r]
set data [read $fp]
close $fp
set datasplitted [split $data "\n"]
set nextnumber 0
for { set number 1 } { $number < [expr [llength $datasplitted]+1] } { incr number } {
if {[string match -nocase *#$number* $datasplitted]==0} {
if {$nextnumber==0} {
set nextnumber $number
}
}
}

######### ADD VERY REQUEST

set fp [open "requests.txt" r]
set data [read $fp]
close $fp

set data [split $data "\n"]
set fid [open requests.txt a]
fconfigure $fid -buffering line
set current_date [strftime "%b %d %Y %H:%M" [expr [clock seconds] - 86400]]
regsub "#" $arg "%" arg
puts $fid "<tr><td>#$nextnumber</td><td>$arg</td><td>[nick2hand $nick $chan]</td><td>$current_date</td><td>$point<td></tr>"
close $fid
putserv "PRIVMSG $chan :- \[NEW REQUEST\]-\[\0037$arg\003\]-\[ADDED BY\]-\[\0037[nick2hand $nick $chan]\003\]-\[NR\]-\[\0037#$nextnumber\003\]-\[DATE\]-\[\0037$current_date\003\]"
putserv "PRIVMSG $chan :Request Added, Sending Notices!"
foreach line [chanlist $chan] {
if {![matchattr $line |X $chan]} {
# putserv "NOTICE $line :- \[NEW REQUEST\]-\[\0037$arg\003\]-\[ADDED BY\]-\[\0037[nick2hand $nick $chan]\003\]-\[NR\]-\[\0037#$nextnumber\003\]-\[DATE\]-\[\0037$current_date\003\]"
}
}

} else {

putserv "PRIVMSG $chan :Sorry That You Do Not Have Enough Points!"
}


} else {

putserv "PRIVMSG $chan :Number Of Points Must Be Greater !"
}

} else {
putserv "PRIVMSG $chan :You Must Enter Score, It Makes You. By Writing !addreq Request|1 It Will Put 1 Point On Request!"
}
} else {
putserv "PRIVMSG $chan :You Are Not Added To Bottom!"
}
}




proc requests {nick uhost hand chan arg} {
if {[nick2hand $nick $chan]!="*"} {

putserv "PRIVMSG $chan :4http://IPTOBOT:8002/"
} else {
putserv "PRIVMSG $chan :User Not Added To Bottom!"
}

}


proc showallpoints {nick uhost hand chan arg} {
if {[nick2hand $nick $chan]!="*"} {

putserv "PRIVMSG $chan :4http://IPTOBOT:8003/"
} else {
putserv "PRIVMSG $chan :You Are Not Added To Bottom!"
}

}



proc delreq {nick uhost hand chan arg} {
regsub "#" $arg "" arg
set error "false"
set deleted "false"
if {[nick2hand $nick $chan]!="*"} {







if {[string match -nocase *|* $arg]!=0} {



set reward [lindex [split $arg "|"] 1]
set arg [lindex [split $arg "|"] 0]

if {[isnumber $arg]} {



if {([validuser $reward]) || ([onchan $reward $chan]!=0) } {

set fp [open "requests.txt" r]
set data [read $fp]
close $fp
set data [split $data "\n"]

set fs [open "requests.txt" w]


for { set number 0 } { $number < [expr [llength $data]-1] } { incr number } {
set currline [lindex $data $number]
if {([string match -nocase *#[lindex $arg 0]* $currline]!=1) } {
puts $fs $currline
} else {

if {[string match -nocase *<td>[nick2hand $nick $chan]</td>* $currline]==1} {

set deleted "true"
set tempsplit [lindex [split $currline ">"] 4]
set point [lindex [split $currline ">"] 10]

regsub "<td" $point "" Point


putserv "PRIVMSG $chan :Requester Was At $point Point, It Has Now Received $reward, and He Has Now[expr [getuser [mynick2hand $reward $chan] XTRA Point] + $point ] Point!"
setuser [mynick2hand $reward $chan] XTRA point [expr [getuser [mynick2hand $reward $chan] XTRA Point] + $point ]

} else {
puts $fs $currline
}
}

}
close $fs
} else {
putserv "PRIVMSG $chan :The User You Want To Give Points To Does Not Exist!"
set error "true"
}
} else {
putserv "PRIVMSG $chan :Invalid Number Entered!"
set error "true"
}






} else {
set error "true"
putserv "PRIVMSG $chan :You Must Specify Who Should Have Points, It Makes You Know, For Example. Write! delreq 23|filler, It Will Remove The Request 23, and Give Points To The User With The Nickname filler. If Your Requests Have Not Been Filled But Just Have To Be Removed Should You Write Your Own Nickname!"
set valid "false"
}







} else {
set error "true"
putserv "PRIVMSG $chan :You Are Not Added To The Bottom!"
}

if {($error=="false") && ($deleted=="false")} {
putserv "PRIVMSG $chan :Requester Was Not Removed, It May Not Be You Who Created It?"

}

if {$deleted=="true"} {
regsub "</td" $tempsplit "" tempsplit

putserv "PRIVMSG $chan :Requesten\0037 $tempsplit (#[expr [lindex $arg 0]])\003 Has Been Deleted "

}



}


proc mynick2hand {nick chan} {
if {[nick2hand $nick $chan]==""} {
set result $nick
} else {
set result [nick2hand $nick $chan]
}
if {$result=="*"} {
set result ""
}
return $result
}

proc getftp {nick uhost hand chan arg} {
if {[nick2hand $nick $chan]!="*"} {

set ftpstring "[getuser [mynick2hand $arg $chan] XTRA ftp]"
if {$ftpstring!=""} {
putserv "NOTICE $nick :$ftpstring"
} else {
putserv "NOTICE $nick :The User Has Not Entered Any PUBLIC Available Information, Try To Ask Him/Her Instead!"
}
} else {
putserv "PRIVMSG $chan :You Are Not Added To Bottom!"
}

}


proc setftp {nick uhost hand chan arg} {
if {[nick2hand $nick $chan]!="*"} {

setuser [nick2hand $nick $chan] XTRA ftp $arg
putserv "NOTICE $nick :Your FTPstring Set!"
} else {
putserv "PRIVMSG $chan :You Are Not Added To Bottom!"
}

}



Şunu türkceleşdirseniz ya :d


Stroom 02 Şubat 2012 16:36

Cevap: aciL tcl Lazım
 
bekliyorum bugün :)


Tüm Zamanlar GMT +3 Olarak Ayarlanmış. Şuanki Zaman: 16:46.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO
Copyright ©2004 - 2025 IRCForumlari.Net Sparhawk