Well, for what you just described you need 2 things:
1) Making the trigger with 'ON TEXT' event

Note: You have two ways to declare a variable: (Variable sign in mIRC is '%')
A) Using '/set'; It makes the variable GLOBAL and you can use it in other functions and events.
B) Using '/var'; It makes the variable LOCAL and it will be automatically unset after the function/event reachs the end.

Another note: You don't need to use '/' within your code. But you can use DOT '.' to make some commands SILENCE

Code:
on *:Text:*:*:{
  ; First i should say that you can use semicolon ';' to make a comment in your script.

  ; Let's begin:
  ; $1 means the FIRST WORD, $2 means the second WORD and .... for more info type /help $1- in your mIRC.
  if ($1 == !pollendgame) && (%inProcess != $true) {
    ; We are declaring 4 variables with the first trigger which is !pollendgame.
    ;   1) %inProcess to check if the vote is already in process.
    ;   2 & 3) %Positive and %Negative to counting the votes. We giving a '0' when we declaring them.
    ;   4) %VoteChannel which contains the Channel name.
    ; /help /set and /help /var
    set %inProcess $true
    set %Positive 0
    set %Negative 0

    ; $chan means that channel which caused the event trigger.
    set %VoteChannel $chan

    ; Here we sending a message to channel to let the users know that a vote is started and they should !vote. /help /msg
    msg $chan For vote type !vote Yes/No

    ; We're executing a timer which will send the result to channel and unset the variables.
    ; Timers may have a name. If you don't specify a name then the next timer that you execute will be
    ; replaced to the old one.
    ; Timer usage: /timer[N/name] [-cdeomhipr] [time] <repetitions> <interval> <command>
    ; Those parts in [] means they're optional and <> means you should define them.
    ; For more info /help /timer
    ; Here we telling the timer to execute the 'EndVote' function ONE TIME after 30seconds
    ; (Like you said: "the program would have 30 seconds before it would end".
    .timerVOTE 1 30 /EndVote

    ; And 'return' i'm sure that you know what it does...
    return
  }
  elseif ($1 == !vote) && ($2 == Yes || $2 == No) && (%inProcess) {
   ; $calc means Calculator for more info /help $calc
   ; Also for increasing and decreasing you can use /inc and /dec the it would be: /inc %Positive
   ; /help /inc and /help /dec.
    if ($2 == Yes) { set %Positive $calc(%Positive + 1) }
    elseif ($2 == No) { set %Negative $calc(%Negative + 1) }
  }
}

2) A function that will send the result to channel and makes our operation done:
(Of course, you can write the codes in the /timer then you don't need any functions. But i wrote it like this to be more understandable.)


Code:
alias EndVote {
  ; Here we're sending the result to channel and unsetting the used variables.
  msg %VoteChannel Vote results > Positive: %Positive -- Negative: %Negative
  unset %inProcess
  unset %Positive
  unset %Negative
  unset %VoteChannel
}

What i just wrote for you was so basic. It can be improved to make it better/shorter with more options.

Don't forget to read the mIRC's help file, it's fair enough to start and being expert in mIRC Scripting...

I hope this would help you to figure out how you should write code in mIRC Script. (Sorry about my English if it wasn't so good...)


Nothing...