(rest string, mob *mobs.Mob, room *rooms.Room)
| 126 | } |
| 127 | |
| 128 | func (c *CleanupModule) mobTrashCommand(rest string, mob *mobs.Mob, room *rooms.Room) (bool, error) { |
| 129 | |
| 130 | // Check whether the user has an item in their inventory that matches |
| 131 | matchItem, found := mob.Character.FindInBackpack(rest) |
| 132 | |
| 133 | if found { |
| 134 | mob.Character.RemoveItem(matchItem) |
| 135 | |
| 136 | events.AddToQueue(events.ItemOwnership{ |
| 137 | MobInstanceId: mob.InstanceId, |
| 138 | Item: matchItem, |
| 139 | Gained: false, |
| 140 | }) |
| 141 | |
| 142 | } |
| 143 | |
| 144 | return true, nil |
| 145 | } |
| 146 | |
| 147 | func (c *CleanupModule) userBuryCommand(rest string, user *users.UserRecord, room *rooms.Room, flags events.EventFlag) (bool, error) { |
| 148 |
nothing calls this directly
no test coverage detected