Difference for python/IPO/send.py from version 1.4 to 1.5


version 1.4 version 1.5
Line 32
 
Line 32
 whoami=Crossfire.WhoAmI()  whoami=Crossfire.WhoAmI()
 idlist=[]  idlist=[]
   
 inv = whoami.CheckInventory("mailscroll")  inv = whoami.Inventory
 if inv != None:  while inv:
  while inv!=None:  
  print("INV:%s" %inv.Name)  
  text=string.split(inv.Name)   text=string.split(inv.Name)
  if text[0]=='mailscroll' and text[1]=='T:' and text[3]=='F:':   if text[0] == 'mailscroll' or text[0] == 'mailwarning':
  idlist.append(inv)   if text[0] == 'mailscroll':
  toname=text[2]   type = 1
  fromname=text[4]  
  message='From: %s\nTo: %s\nDate: %s\n\n%s\n' % (fromname, toname, date, inv.Message[:-1])  
  activator.Write('mailscroll to '+toname+' sent.')  
  mail.send(1, toname, fromname, message)  
  elif text[0]=='mailscroll' and text[1]=='F:' and text[3]=='T:':  
  idlist.append(inv)  
  fromname=text[2]  
  toname=text[4]  
  message=inv.Message[:-1]+'\n'  
  mail.send(1, toname, fromname, message)  
  else:   else:
  print "ID: %d"%inv   type = 3
  print "Name: "+inv.Name   if text[1] == 'T:' and text[3] == 'F:':
  inv=inv.Below  
   
 inv = whoami.CheckInventory("mailwarning")  
 if inv != None:  
  while inv!=None:  
  text=string.split(inv.Name)  
  if text[0]=='mailwarning' and text[1]=='T:' and text[3]=='F:':  
  idlist.append(inv)   idlist.append(inv)
  toname=text[2]   toname=text[2]
  fromname=text[4]   fromname=text[4]
  message='From: %s\nTo: %s\nDate: %s\n\n%s\n' % (fromname, toname, date, inv.Message[:-1])   message='From: %s\nTo: %s\nDate: %s\n\n%s\n' % (fromname, toname, date, inv.Message[:-1])
  activator.Write('mailwarning to '+toname+' sent.')   activator.Write(text[0]+' to '+toname+' sent.')
  mail.send(3, toname, fromname, message)   mail.send(type, toname, fromname, message)
  elif text[0]=='mailwarning' and text[1]=='F:' and text[3]=='T:':   elif text[1] == 'F:' and text[3] == 'T:':
  idlist.append(inv)   idlist.append(inv)
  fromname=text[2]   fromname=text[2]
  toname=text[4]   toname=text[4]
  message=inv.Message[:-1]+'\n'   message=inv.Message[:-1]+'\n'
  mail.send(3, toname, fromname, message)   mail.send(type, toname, fromname, message)
  else:  
  print "ID: %d"%inv  
  print "Name: "+inv.Name  
  inv=inv.Below   inv=inv.Below
   
 for inv in idlist:  for inv in idlist:


Legend:
line(s) removed in v.1.4 
line(s) changed
 line(s) added in v.1.5

File made using version 1.96 of cvs2html by leaf at 2006-02-15 17:29