/* ModServer by Shades / fake a.k.a. Erik Lindberg 96-11-14 -Fixed lha of () names 96-11-26 -Fixed packing of already packed files 97-03-13 -Shortened it down 97-03-13 */ authorpath='AmiTCP:Clients/AmIRC/rexx/' temppath='ram:' /* Don't change below unless you know what you're doing */ options results parse arg last address AMIRC.1 last=compress(last,D2C(1)) parseline last text=line.rest nick=line.prefix first=index(nick,'!') nick=substr(nick,1,first-1) address AMIRC.1 'getmynick' ownnick=result if upper(text) == ":GETMOD" | upper(text) == ":MODGET" then do if show('P','HIPPOPLAYER') then do address HIPPOPLAYER get FNAM filename=result end if show('P','DELITRACKER') then do address DELITRACKER status m fil filename=result status m dir dirname=result filename=insert(filename,dirname,length(dirname)) end archivename=substr(filename,max(lastpos(':', filename),lastpos('/', filename)) +1) archivename=delstr(archivename,lastpos('.',archivename)) archivename=compress(archivename,'()') filename=translate(filename,'??','()') if upper(right(filename,4)) ~= ".LHA" then do address command 'lha -h a 'temppath||archivename||' '||filename address AMIRC.1 'say /dcc send 'nick' 'temppath||archivename'.lha' end else address AMIRC.1 'say /dcc send 'nick' '||filename end if upper(text) == ":GETMODUNPACK" | upper(text) == ":MODGETUNPACK" then do if show('P','HIPPOPLAYER') then do address HIPPOPLAYER get FNAM filename=result end if show('P','DELITRACKER') then do address DELITRACKER status m fil filename=result status m dir dirname=result filename=insert(filename,dirname,length(dirname)) end address AMIRC.1 'say /dcc send 'nick' 'filename end if upper(text) == ":MODINFO" then do yes=0 if show('P','HIPPOPLAYER') then do yes=1 address 'HIPPOPLAYER' GET NAME modname=result GET SIZE size=result%1024 address AMIRC.1 'say /msg 'nick' 'ownnick' is playing 'd2c(2)modname d2c(2)'size: 'size'K. Do a /CTCP 'ownnick' getmod to fetch it, and use getmodunpack to get it unpacked' end if show('P','DELITRACKER') then do yes=1 address 'DELITRACKER' status m nam modname=result status m dir creator=result creator=delstr(creator,length(creator)) creator=substr(creator,max(lastpos(':', creator),lastpos('/', creator)) +1) creator=seekcreator(creator) if creator=='' then address AMIRC.1 'say /msg 'nick' 'ownnick' is playing 'd2c(2)modname d2c(2)'. Do a /CTCP 'ownnick' getmod to fetch it, and use getmodunpack to get it unpacked' else address AMIRC.1 'say /msg 'nick' 'ownnick' is playing 'd2c(2)modname d2c(2)' by: 'creator'. Do a /CTCP 'ownnick' getmod to fetch it, and use getmodunpack to get it unpacked' end if yes == 0 then address AMIRC.1 'say /msg 'nick' 'ownnick' is not playing any modules. Try again later.' end seekcreator: parse arg creator if open('Authors',authorpath'Authornames.txt','R') then do seek=0 DO UNTIL seek==1 | EOF('Authors') string=READLN('Authors') if find(string,creator) then do creator=subword(string, 3) seek=1 end end close('Authors') end if seek==0 then do if open('Groups',authorpath'Groupnames.txt','R') then do seek=0 DO UNTIL seek==1 | EOF('Groups') string=READLN('Groups') if find(string,creator) then do creator=subword(string, 3) creator=INSERT('someone in ',creator,0) seek=1 end end close('Groups') end end if seek==0 then creator='' return creator