Скрипт для Eggdrop, который умел по запросу выдать список файлов или какой-нибудь конкретный текстовый файл. Пытался сделать канал, где можно было получить по запросу лириксы на конкретный альбом исполнителя.
Как обычно, ни к чему это не привело. Остался скрипт =)
bind join — * join:msg_welcome
bind pub — «!get» txt:get
bind msg — «get» txt:get
bind pub — «!getdcc» dcc:get
bind msg — «getdcc» dcc:get
set botnick
set DS_ver «0.3-rc1 Tue May 11 18:40:02 2004»
set welcome «Type ‘!get help’ (without quotes!) for getting more information.»
set our_channels «#phobos.talk #lyr»
set sharedir «/home/mef/lyr/»
set nafile «File not available. Type ‘!get list’ for getting lastest filelist.»
proc join:msg_welcome {nick host hand chan} {
global botnick our_channels welcome
if { [lsearch $our_channels $chan] == -1} { return 0 }
puthelp «NOTICE $nick :$welcome»
return 1
}
proc dcc:get {nick uhost hand chan file} {
global our_channels nafile sharedir
if { [lsearch $our_channels $chan] == -1 } then { return 0 }
if { [dccsend $sharedir/$file $nick] != 0 } {
dccsend $sharedir/$file $nick }
putlog «DocServ dcc $file -> $nick»
puthelp «NOTICE $nick :Sending $file to you..»
dccsend $file $nick
return 1
}
proc txt:get {nick uhost hand chan file} {
set file [lindex $file 0] global our_channels nafile sharedir
if { [lsearch $our_channels $chan] == -1 } { return 0 }
set end_file 0
if { [file exist $sharedir/$file] } {
set open_file [open $sharedir/$file r] } else { puthelp «NOTICE $nick :$nafile» }
putlog «DocServ txt $file -> $nick»
while { ![eof $open_file] } {
gets $open_file line
puthelp «PRIVMSG $nick :$line»
set end_file 1
}
close $open_file
return 1
}
putlog «DocServ $DS_ver by mef@RusNet <mef@anarxi.st> «
В былое время активного пользования IRC у меня был весьма крутой почтовый ящик =)