Looking at Barsoomian honor, I’d say it’s probably a complex issue in settting. Is there a difference honor-wise between a personal duel between Martians, whether gun or blade, and an active military engagement between hundreds of ships and millions of troops? Does a commander consider the personal honor of each soldier under their command when autoguns are chattering and cannons are pounding away at their position from beyond the horizon? Or do they possibly offload the collective honor of their troops onto them-self, taking harsh punishment or disgrace for any major breach of honor their troops inflict on the enemy, allowing them the tactical and strategic possibilities they need to complete the mission?
Either way, I think it’s not what you’re armed with, but who draws what and who draws first, setting the tone for the fight, at least when it comes to personal combat.
If they’re coming at you with long sword drawn and you respond in kind, disarming them and running them through, I would say that would be entirely honorable. The enemy wasn’t coming at you with their fists, short sword, rifle or dagger but with their longsword, them being a poor enough swordsperson to lose their blade and die isn’t because you cheated.
Intentionally shooting someone armed with a sword depends on whether they were already armed or are responding to you. If they were already armed and you shoot them you’re being a dishonorable jerk, they’re armed and are presumably expecting an attack, you’re responding to their armed state by cheating. If they choose to respond with steel to your rifle it’s an honorable combat, one of you has set the tone of the fight by bringing out a rifle at the start of combat, if the other chooses to respond with steel it’s their problem for not drawing their own rifle.
If they draw steel before you can draw your rifle, you are honor bound to draw your sword, you are responding to them. If you’re able to draw your rifle before they can draw any weapons it doesn’t matter what weapon they draw when it comes to your honor, they are responding to you.