Permalink
Browse files

Fixed two add related issues with tf2.pug

  • Loading branch information...
1 parent 128a8f9 commit bc1ac6df72bc08d2278d08770ba094eb200be554 Luke Curley committed Sep 24, 2011
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/logic/players-random.rb
@@ -14,11 +14,10 @@ def add_player user, classes
classes.uniq! # remove duplicate classes
rej = classes.reject! { |clss| not const["teams"]["classes"].key? clss } # remove invalid classes
- notice user, "Invalid class. Possible options are #{ const["teams"]["classes"].keys * ", " }" if rej
+ return notice user, "Invalid class. Possible options are #{ const["teams"]["classes"].keys * ", " }" if rej
tf_class = classes.first
return notice user, "That class is full, please pick another." if get_classes[tf_class].size >= const["teams"]["classes"][tf_class] * const["teams"]["count"]
- return notice user, "You cannot add as captain in this channel." if tf_class == 'captain'
u = find_user user
u = create_user user unless u

0 comments on commit bc1ac6d

Please sign in to comment.