Skip to content

Commit

Permalink
vfmt everything
Browse files Browse the repository at this point in the history
  • Loading branch information
emily33901 committed Jul 21, 2020
1 parent b142013 commit 3a0d3d2
Show file tree
Hide file tree
Showing 18 changed files with 449 additions and 403 deletions.
4 changes: 2 additions & 2 deletions alanguage.v
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,6 @@ fn (h MsgBaseHeader) decompose() (bool, Msg) {

struct MsgHdrProtobuf {
mut:
msg u32
msg u32
header_length int
}
}
11 changes: 6 additions & 5 deletions asteamid.v
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module vapor

// SteamId represents a steamid
pub type SteamId = u64
pub type SteamId u64

// default_steamid is the default
// default_steamid is the default
// universe 1, type .individual, instance 1, id 0
// steamid
pub const (
Expand All @@ -16,11 +16,12 @@ const (
steamid_instance_mask = 0x000FFFFF00000000
steamid_id_mask = 0x00000000FFFFFFFF
)

const (
steamid_universe_shift = 56
steamid_type_shift = 52
steamid_type_shift = 52
steamid_instance_shift = 32
steamid_id_shift = 0
steamid_id_shift = 0
)

// steamid creates a SteamId from the u64 given
Expand Down Expand Up @@ -65,4 +66,4 @@ pub fn (s SteamId) instance() int {
// id returns the account id
pub fn (s SteamId) id() u32 {
return u32((u64(s) & steamid_id_mask) >> steamid_id_shift)
}
}
11 changes: 4 additions & 7 deletions callback.v
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
module vapor

// TODO maybe move to its own module

// Callback represents all the possible callbacks
pub type Callback =
ConnectedCallback | DisconnectedCallback |

LoggedOnCallback | LoggedOffCallback
pub type Callback = ConnectedCallback | DisconnectedCallback | LoggedOffCallback | LoggedOnCallback


// CallbackHandler lets types handle callbacks
pub interface CallbackHandler {
handle_callback(cb Callback)?
}
handle_callback(cb Callback) ?
}
202 changes: 101 additions & 101 deletions cmlist.v
Original file line number Diff line number Diff line change
Expand Up @@ -4,109 +4,109 @@ import rand

const (
hardcoded_cm_list = [
'162.254.196.84:27019',
'162.254.196.84:27018',
'162.254.196.83:27017',
'162.254.196.83:27018',
'162.254.196.83:27019',
'162.254.196.67:27017',
'162.254.196.67:27019',
'162.254.196.68:27018',
'162.254.196.68:27019',
'162.254.196.67:27018',
'162.254.196.68:27017',
'162.254.196.84:27017',
'155.133.248.36:27017',
'155.133.248.38:27019',
'155.133.248.36:27018',
'155.133.248.35:27018',
'155.133.248.36:27020',
'155.133.248.34:27017',
'155.133.248.39:27023',
'155.133.248.39:27022',
'155.133.248.37:27019',
'155.133.248.39:27024',
'155.133.248.37:27017',
'155.133.248.38:27026',
'155.133.248.34:27021',
'155.133.248.35:27021',
'155.133.248.34:27018',
'155.133.248.35:27019',
'155.133.248.36:27021',
'155.133.248.35:27020',
'155.133.248.38:27020',
'155.133.248.38:27024',
'155.133.248.38:27025',
'155.133.248.39:27025',
'155.133.248.38:27023',
'155.133.248.39:27020',
'155.133.248.37:27020',
'155.133.248.34:27019',
'155.133.248.39:27027',
'155.133.248.38:27021',
'155.133.248.38:27022',
'155.133.248.39:27018',
'155.133.248.39:27019',
'155.133.248.38:27017',
'155.133.248.38:27027',
'155.133.248.39:27026',
'155.133.248.39:27021',
'155.133.248.38:27018',
'155.133.248.36:27019',
'155.133.248.37:27018',
'155.133.248.35:27017',
'155.133.248.34:27020',
'155.133.248.39:27017',
'155.133.248.37:27021',
'185.25.182.76:27018',
'185.25.182.77:27019',
'185.25.182.77:27018',
'185.25.182.76:27020',
'185.25.182.77:27021',
'185.25.182.76:27021',
'185.25.182.76:27017',
'185.25.182.77:27020',
'185.25.182.76:27019',
'185.25.182.77:27017',
'162.254.192.87:27018',
'162.254.192.87:27023',
'162.254.192.101:27021',
'162.254.192.87:27019',
'162.254.192.109:27019',
'162.254.192.71:27017',
'162.254.192.108:27019',
'162.254.192.109:27017',
'162.254.192.71:27024',
'162.254.192.87:27026',
'162.254.192.87:27022',
'162.254.192.101:27018',
'162.254.192.100:27017',
'162.254.192.87:27020',
'162.254.192.87:27017',
'162.254.192.87:27025',
'162.254.192.71:27026',
'162.254.192.87:27021',
'162.254.192.87:27027',
'162.254.192.71:27025',
'162.254.192.101:27017',
'162.254.192.71:27022',
'162.254.192.109:27020',
'162.254.192.71:27021',
'162.254.192.100:27019',
'162.254.192.100:27021',
'162.254.192.108:27018',
'162.254.192.108:27021',
'162.254.192.109:27021',
'162.254.192.109:27018',
'162.254.192.101:27019',
'162.254.192.108:27020',
'162.254.192.108:27017',
'162.254.192.100:27020',
'162.254.192.71:27019',
'162.254.192.101:27020'
'162.254.196.84:27019',
'162.254.196.84:27018',
'162.254.196.83:27017',
'162.254.196.83:27018',
'162.254.196.83:27019',
'162.254.196.67:27017',
'162.254.196.67:27019',
'162.254.196.68:27018',
'162.254.196.68:27019',
'162.254.196.67:27018',
'162.254.196.68:27017',
'162.254.196.84:27017',
'155.133.248.36:27017',
'155.133.248.38:27019',
'155.133.248.36:27018',
'155.133.248.35:27018',
'155.133.248.36:27020',
'155.133.248.34:27017',
'155.133.248.39:27023',
'155.133.248.39:27022',
'155.133.248.37:27019',
'155.133.248.39:27024',
'155.133.248.37:27017',
'155.133.248.38:27026',
'155.133.248.34:27021',
'155.133.248.35:27021',
'155.133.248.34:27018',
'155.133.248.35:27019',
'155.133.248.36:27021',
'155.133.248.35:27020',
'155.133.248.38:27020',
'155.133.248.38:27024',
'155.133.248.38:27025',
'155.133.248.39:27025',
'155.133.248.38:27023',
'155.133.248.39:27020',
'155.133.248.37:27020',
'155.133.248.34:27019',
'155.133.248.39:27027',
'155.133.248.38:27021',
'155.133.248.38:27022',
'155.133.248.39:27018',
'155.133.248.39:27019',
'155.133.248.38:27017',
'155.133.248.38:27027',
'155.133.248.39:27026',
'155.133.248.39:27021',
'155.133.248.38:27018',
'155.133.248.36:27019',
'155.133.248.37:27018',
'155.133.248.35:27017',
'155.133.248.34:27020',
'155.133.248.39:27017',
'155.133.248.37:27021',
'185.25.182.76:27018',
'185.25.182.77:27019',
'185.25.182.77:27018',
'185.25.182.76:27020',
'185.25.182.77:27021',
'185.25.182.76:27021',
'185.25.182.76:27017',
'185.25.182.77:27020',
'185.25.182.76:27019',
'185.25.182.77:27017',
'162.254.192.87:27018',
'162.254.192.87:27023',
'162.254.192.101:27021',
'162.254.192.87:27019',
'162.254.192.109:27019',
'162.254.192.71:27017',
'162.254.192.108:27019',
'162.254.192.109:27017',
'162.254.192.71:27024',
'162.254.192.87:27026',
'162.254.192.87:27022',
'162.254.192.101:27018',
'162.254.192.100:27017',
'162.254.192.87:27020',
'162.254.192.87:27017',
'162.254.192.87:27025',
'162.254.192.71:27026',
'162.254.192.87:27021',
'162.254.192.87:27027',
'162.254.192.71:27025',
'162.254.192.101:27017',
'162.254.192.71:27022',
'162.254.192.109:27020',
'162.254.192.71:27021',
'162.254.192.100:27019',
'162.254.192.100:27021',
'162.254.192.108:27018',
'162.254.192.108:27021',
'162.254.192.109:27021',
'162.254.192.109:27018',
'162.254.192.101:27019',
'162.254.192.108:27020',
'162.254.192.108:27017',
'162.254.192.100:27020',
'162.254.192.71:27019',
'162.254.192.101:27020',
]
)

fn hardcoded_cm() string {
return hardcoded_cm_list[rand.int_in_range(0, hardcoded_cm_list.len)]
}
}
Loading

0 comments on commit 3a0d3d2

Please sign in to comment.