question: protected synchronized List < User > modsListReceived ( String channel , List < String > modsList ) { Map < String , User > usersToDemod = getUsersByChannel ( channel ) ; for ( User user : usersToDemod . values ( ) ) { user . setModerator ( false ) ; } LOGGER . info ( "Setting users as mod for " + channel + ": " + modsList ) ; List < User > changedUsers = new ArrayList < > ( ) ; for ( String userName : modsList ) { if ( Helper . validateChannel ( userName ) ) { User user = getUser ( channel , userName ) ; if ( user . setModerator ( true ) ) { userUpdated ( user ) ; } changedUsers . add ( user ) ; } } return changedUsers ; }
target:  The list of mods received with channel context, set the containing names as mod. Returns the changed users so they can be updated in the GUI.