def _UpdateUserHistory(user, t, auth):
 ts = _history.get(user, [])[(-30):]
 ts.append((t, auth))
 _history[user] = ts
 return ts

def _UpdateUserHistory ( user , t , auth ) : ts = _history . get ( user , [ ] ) [ ( - 30 ) : ] ts . append ( ( t , auth ) ) _history [ user ] = ts return ts
updates the user history with the specified timestamp and auth code .