Menu

Hey u steal my ideaaaaaaaaa

Help
Cran1988
2006-03-08
2013-03-22
  • Cran1988

    Cran1988 - 2006-03-08

    I was working for a weak for the fileserver but in python!
    But u are working very well than me!As u have started and u have already make ur team I will stop my work!
    As i am still going school i have not so many time as u! But i will show my work !if u want a python scripter plz tell me now in this forum i will be greatfull!Also tell me if this is good

    __module_name__ = "The new world comes"
    __module_version__ = "1.0"
    __module_description__ = "Cran's file server"
    import xchat
    import re
    import string
    import os
    queus=2
    trigger={'!books':'/home/user/docs/'}  
    q=0
    real=0
    mynick=['Cran1988']
    mychannels=['#download']
    m=True
    n=[]
    def abortprints(word,word_eol,userdata):
        global m
       
        global openfile
        if  xchat.get_info('channel') in mychannels  and xchat.get_info('nick') in mynick:
         xchat.command(('msg %s Ooops Aborted ')%(word[0]))
         m=True
         openfile=[]
            

    def commandchannel(word,word_eol,userdata):
        global real
        global mynick
        global mychannels
        global m
        global openfile
        global trigger
        if  xchat.get_info('channel') in mychannels  and xchat.get_info('nick') in mynick:
             if word[1]=='!list':
            
             xchat.command(('say Triggers:%s  ')%(trigger.keys()))
             if trigger.has_key(word[1]):
            
             if m is True and len(xchat.get_list('dcc'))!=3:
                     real=trigger[word[1]]
                 openfile=[]
                 for i in os.listdir(real):
                  openfile.append(i)
                 xchat.command(('dcc chat %s')%(word[0]))
                 xchat.command(('msg %s FileServer from Cran ')%(word[0]))
                 m=False
                 
                    
    def commandprv(word,word_eol,userdata):
            global real
            global mynick
            global openfile
           
            dprv = re.split(' ',string.lower(word[1]))
           
            
            if dprv[0]=='ls':
                for item in openfile:
                    xchat.command(("say %s")%item)
                    elif dprv[0]=='get':
                if dprv[1] in openfile:
                    xchat.command(("dcc send %s %s")%(word[0],real +  dprv[1]))
                   
            elif dprv[0]=='cd':
                if dprv[1] in openfile:
                    del openfile
                    openfile=[]
                    for item in os.listdir(real+dprv[1]):
                        openfile.append(item)
                        xchat.command(('say %s')%item)
                   
           
            elif dprv[0]=='back':
                  del openfile
                  openfile=[]   
                  for i in os.listdir(real):
                      openfile.append(i)
                          xchat.command(("say %s")%i)
                           
               
                       
                   
    #------------------------------------------------------------------------
    xchat.hook_print('Channel Message',commandchannel)

    xchat.hook_print('Private Message to Dialog',commandprv)       
    xchat.hook_print('DCC CHAT Abort',abortprints)                     
    xchat.hook_print('DCC CHAT Failed',abortprints)

     
    • Aypok

      Aypok - 2006-06-20

      Hey dude, sorry for the late reply - I don't check these forums anymore. TuxServe is a dead project, as stated on the site.

      We did start work on a Python fserve, but it was abandoned due to lack of time and interest.

      You should carry on with your own version. :) Good luck.

       

Log in to post a comment.