I asked you to turn on /debug
for a reason, not just on a whim. We don't know which IRCd your server is using. Without seeing exactly what you are talking about, your question can be interpretted in many different ways.
I saw that if I connect to an IRC server and join a channel mIRC sends "MODE #channel" to get the channel modes.
But few seconds later when I become OP in this channel he sends "MODE #channel" again. WHY?
Part of every JOIN process is the SERVER issuing the MODE command on your behalf (on the IRCd's I have tested it on, anyway). That's the first mode command which will eventually give you the current channel modes. You then go on to say "when I become OP", you see another MODE #channel
command. Does this one also happen to include +o YourNick
on the end? If so, then that is the command that makes you an OP, without which you wouldn't be one.
See what I mean? I realize that you are probably well aware that MODE #channel +o YourNick
means becoming OP, but without seeing a concrete example, we're all just guessing.