# Bulgarian translation of xchat2. # This file is put in the public domain. # Rostislav Raykov , 2005. # Rostislav Raykov , 2005. # Even though this file is set to correspond to 2.4.2 # version it is synced with xchat HEAD. We still have to # work around the TP robot. # # msgid "" msgstr "" "Project-Id-Version: xchat 2.4.2\n" "Report-Msgid-Bugs-To: www.xchat.org\n" "POT-Creation-Date: 2005-03-07 18:50+1100\n" "PO-Revision-Date: 2005-05-20 17:51+0300\n" "Last-Translator: Rostislav Raykov \n" "Language-Team: Bulgarian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" #: src/common/cfgfiles.c:350 msgid "Cannot create ~/.xchat2" msgstr "Не може да се създаде ~/.xchat2" #: src/common/cfgfiles.c:672 msgid "I'm busy" msgstr "Зает съм" #: src/common/cfgfiles.c:673 msgid "Leaving" msgstr "Напускам" #: src/common/cfgfiles.c:719 msgid "" "* Running IRC as root is stupid! You should\n" " create a User Account and use that to login.\n" msgstr "" "* Да влизате в IRC като root е ГЛУПАВО! Направете си\n" " потребител и използвайте него.\n" #: src/common/dcc.c:61 msgid "Waiting" msgstr "Чакам" #: src/common/dcc.c:62 msgid "Active" msgstr "Активна" #: src/common/dcc.c:63 msgid "Failed" msgstr "Пропадна" #: src/common/dcc.c:64 msgid "Done" msgstr "Готово" #: src/common/dcc.c:65 msgid "Connect" msgstr "Свързване" #: src/common/dcc.c:66 msgid "Aborted" msgstr "Прекъснато" #: src/common/dcc.c:1299 #, c-format msgid "Cannot access %s\n" msgstr "Няма достъп до %s\n" #: src/common/dcc.c:1919 msgid "No active DCCs\n" msgstr "Няма активни DCC-та\n" #: src/common/ignore.c:120 src/common/ignore.c:124 src/common/ignore.c:128 #: src/common/ignore.c:132 src/common/ignore.c:136 src/common/ignore.c:140 #: src/common/ignore.c:144 msgid "YES " msgstr "ДА" #: src/common/ignore.c:122 src/common/ignore.c:126 src/common/ignore.c:130 #: src/common/ignore.c:134 src/common/ignore.c:138 src/common/ignore.c:142 #: src/common/ignore.c:146 msgid "NO " msgstr "НЕ" #: src/common/ignore.c:373 #, c-format msgid "You are being CTCP flooded from %s, ignoring %s\n" msgstr "Вие сте CTCP flood-нати от %s, игнорира се %s\n" #: src/common/ignore.c:398 #, c-format msgid "You are being MSG flooded from %s, setting gui_auto_open_dialog OFF.\n" msgstr "Вие сте заляти(flood) със съобщения от %s, настройва се автоматичния диалог на изключен.\n" #: src/common/notify.c:400 #, c-format msgid " %-20s online\n" msgstr " %-20s онлайн\n" #: src/common/notify.c:402 #, c-format msgid " %-20s offline\n" msgstr " %-20s офлайн\n" #: src/common/outbound.c:70 msgid "No channel joined. Try /join #\n" msgstr "Не сте влезли в стая. Опитайте с /join #<стая>\n" #: src/common/outbound.c:76 msgid "Not connected. Try /server []\n" msgstr "Не сте свързани. Опитайте с /server <хост> [<порт>]\n" #: src/common/outbound.c:1375 msgid "I need /bin/sh to run!\n" msgstr "Нужен е /bin/sh, за да се изпълни!\n" #: src/common/outbound.c:1618 msgid "" "\n" "Commands Available:\n" "\n" " " msgstr "" "\n" "Налични команди:\n" "\n" " " #: src/common/outbound.c:1653 msgid "" "\n" "\n" "Type /HELP for more information, or /HELP -l\n" "\n" msgstr "" "\n" "\n" "Напишете /HELP <команда> за повече информация, или /HELP -l\n" "\n" #: src/common/outbound.c:1654 msgid "" "User defined commands:\n" "\n" " " msgstr "" "Потребителски команди:\n" "\n" " " #: src/common/outbound.c:1746 #, c-format msgid "Unknown arg '%s' ignored." msgstr "Непознатия аргумент '%s' се игнорира." #: src/common/outbound.c:2524 msgid "No such plugin found.\n" msgstr "Няма намерен такъв плъгин.\n" #: src/common/outbound.c:2529 src/fe-gtk/plugingui.c:185 msgid "That plugin is refusing to unload.\n" msgstr "Този плъгин не иска да се отзарежда.\n" #: src/common/outbound.c:2686 msgid "ADDBUTTON , adds a button under the user-list" msgstr "ADDBUTTON <име> <действие>, добавя бутон под списъка с потребители" #: src/common/outbound.c:2688 msgid "ALLCHAN , sends a command to all channels you're in" msgstr "ALLCHAN <команда>, изпраща команда към всички присъединени стаи" #: src/common/outbound.c:2690 msgid "ALLSERV , sends a command to all servers you're in" msgstr "ALLSERV <команда>, изпраща команда към всички сървъри, към които сте свързан" #: src/common/outbound.c:2691 msgid "AWAY [], sets you away" msgstr "AWAY [<причина>], включва режим \"Отсъствам\"" #: src/common/outbound.c:2693 msgid "BAN [], bans everyone matching the mask from the current channel. If they are already on the channel this doesn't kick them (needs chanop)" msgstr "" #: src/common/outbound.c:2695 msgid "CLEAR, Clears the current text window" msgstr "CLEAR, изчиства текущия текстов прозорец" #: src/common/outbound.c:2696 msgid "CLOSE, Closes the current window/tab" msgstr "CLOSE, затваря текущия прозорец/таб" #: src/common/outbound.c:2699 msgid "COUNTRY [-s] , finds a country code, eg: au = australia" msgstr "COUNTRY <код>, намира код на страна, пример: au = Австралия" #: src/common/outbound.c:2701 msgid "CTCP , send the CTCP message to nick, common messages are VERSION and USERINFO" msgstr "" #: src/common/outbound.c:2703 msgid "CYCLE, parts current channel and immediately rejoins" msgstr "CYCLE, излиза се от текущата стая и после веднага пак се влиза в нея" #: src/common/outbound.c:2705 msgid "" "\n" "DCC GET - accept an offered file\n" "DCC SEND [-maxcps=#] [file] - send a file to someone\n" "DCC LIST - show DCC list\n" "DCC CHAT - offer DCC CHAT to someone\n" "DCC CLOSE example:\n" " /dcc close send johnsmith file.tar.gz" msgstr "" #: src/common/outbound.c:2715 msgid "DEHOP , removes chanhalf-op status from the nick on the current channel (needs chanop)" msgstr "" #: src/common/outbound.c:2717 msgid "DELBUTTON , deletes a button from under the user-list" msgstr "DELBUTTON <име>, изтрива бутон от тези, които са под списъка с потребителите" #: src/common/outbound.c:2719 msgid "DEOP , removes chanop status from the nick on the current channel (needs chanop)" msgstr "" #: src/common/outbound.c:2721 msgid "DEVOICE , removes voice status from the nick on the current channel (needs chanop)" msgstr "" #: src/common/outbound.c:2722 msgid "DISCON, Disconnects from server" msgstr "DISCON, прекъсва връзката към сървъра" #: src/common/outbound.c:2723 msgid "DNS , Finds a users IP number" msgstr "" #: src/common/outbound.c:2724 msgid "ECHO , Prints text locally" msgstr "" #: src/common/outbound.c:2727 msgid "EXEC [-o] , runs the command. If -o flag is used then output is sent to current channel, else is printed to current text box" msgstr "" #: src/common/outbound.c:2729 msgid "EXECCONT, sends the process SIGCONT" msgstr "" #: src/common/outbound.c:2732 msgid "EXECKILL [-9], kills a running exec in the current session. If -9 is given the process is SIGKILL'ed" msgstr "" #: src/common/outbound.c:2734 msgid "EXECSTOP, sends the process SIGSTOP" msgstr "" #: src/common/outbound.c:2735 msgid "EXECWRITE, sends data to the processes stdin" msgstr "" #: src/common/outbound.c:2739 msgid "FLUSHQ, flushes the current server's send queue" msgstr "" #: src/common/outbound.c:2741 msgid "GATE [], proxies through a host, port defaults to 23" msgstr "" #: src/common/outbound.c:2747 msgid "HOP , gives chanhalf-op status to the nick (needs chanop)" msgstr "" #: src/common/outbound.c:2749 msgid "" "IGNORE \n" " mask - host mask to ignore, eg: *!*@*.aol.com\n" " types - types of data to ignore, one or all of:\n" " PRIV, CHAN, NOTI, CTCP, DCC, INVI, ALL\n" " options - NOSAVE, QUIET" msgstr "" #: src/common/outbound.c:2756 msgid "INVITE [], invites someone to a channel, by default the current channel (needs chanop)" msgstr "" #: src/common/outbound.c:2757 msgid "JOIN , joins the channel" msgstr "JOIN <стая>, влизане в дадена стая" #: src/common/outbound.c:2759 msgid "KICK , kicks the nick from the current channel (needs chanop)" msgstr "KICK <прякор>, изхвърля упоменатия човек от текущата стая (изисква операторски статус)" #: src/common/outbound.c:2761 msgid "KICKBAN , bans then kicks the nick from the current channel (needs chanop)" msgstr "" #: src/common/outbound.c:2764 msgid "LAGCHECK, forces a new lag check" msgstr "LAGCHECK, пуска нова проверка на забавянето на репликите" #: src/common/outbound.c:2766 msgid "LASTLOG , searches for a string in the buffer" msgstr "LASTLOG <низ>, търси за низ в буфера" #: src/common/outbound.c:2768 msgid "LOAD , loads a plugin or script" msgstr "LOAD <файл>, зарежда плъгин или скрипт" #: src/common/outbound.c:2771 msgid "MDEHOP, Mass deop's all chanhalf-ops in the current channel (needs chanop)" msgstr "" #: src/common/outbound.c:2773 msgid "MDEOP, Mass deop's all chanops in the current channel (needs chanop)" msgstr "" #: src/common/outbound.c:2775 msgid "ME , sends the action to the current channel (actions are written in the 3rd person, like /me jumps)" msgstr "ME <действие>, изпраща действието към текущата стая (действията трябва да са в трето лице. пример: /me скача)" #: src/common/outbound.c:2777 msgid "MKICK, Mass kicks everyone except you in the current channel (needs chanop)" msgstr "" #: src/common/outbound.c:2780 msgid "MOP, Mass op's all users in the current channel (needs chanop)" msgstr "MOP, масово дава операторски статус на всички потребители в дадената стая (изисква същия статус)" #: src/common/outbound.c:2781 msgid "MSG , sends a private message" msgstr "MSG <прякор> <съобщение>, праща лично съобщение" #: src/common/outbound.c:2784 msgid "NAMES, Lists the nicks on the current channel" msgstr "NAMES, изписва прякорите в текущата стая" #: src/common/outbound.c:2786 msgid "NCTCP , Sends a CTCP notice" msgstr "" #: src/common/outbound.c:2787 msgid "NEWSERVER []" msgstr "NEWSERVER <име на хост> [<порт>]" #: src/common/outbound.c:2788 msgid "NICK , sets your nick" msgstr "NICK <прякор>, настройва прякора ви" #: src/common/outbound.c:2791 msgid "NOTICE , sends a notice. Notices are a type of message that should be auto reacted to" msgstr "NOTICE <прякор/стая> <съобщение>, изпраща уведомение. Това са вид въобщения,към които трябва да се реагира автоматично" #: src/common/outbound.c:2793 msgid "NOTIFY [], lists your notify list or adds someone to it" msgstr "NOTIFY [<прякор>], изписва списъка с приятелчетата ти или добавя някой" #: src/common/outbound.c:2795 msgid "OP , gives chanop status to the nick (needs chanop)" msgstr "OP <прякор>, дава операторски статус на прякора (изисква същия статус)" #: src/common/outbound.c:2797 msgid "PART [] [], leaves the channel, by default the current one" msgstr "PART [<стая>] [<причина>], напуска стаята, по подразбиране текущата" #: src/common/outbound.c:2799 msgid "PING , CTCP pings nick or channel" msgstr "PING <прякор | стая>, CTCP пинг към прякор или стая" #: src/common/outbound.c:2801 msgid "QUERY , opens up a new privmsg window to someone" msgstr "QUERY <прякор>, отваря нов диалогов прозорец с някой" #: src/common/outbound.c:2803 msgid "QUIT [], disconnects from the current server" msgstr "QUIT [<причина>], разкача се от текущия сървър" #: src/common/outbound.c:2805 msgid "QUOTE , sends the text in raw form to the server" msgstr "QUOTE <текст>, праща текста в чиста форма към сървъра" #: src/common/outbound.c:2808 msgid "RECONNECT [-ssl] [] [] [], Can be called just as /RECONNECT to reconnect to the current server or with /RECONNECT ALL to reconnect to all the open servers" msgstr "" #: src/common/outbound.c:2811 msgid "RECONNECT [] [] [], Can be called just as /RECONNECT to reconnect to the current server or with /RECONNECT ALL to reconnect to all the open servers" msgstr "" #: src/common/outbound.c:2813 msgid "RECV , send raw data to xchat, as if it was received from the irc server" msgstr "RECV <текст>, праща чиста информация към X-Chat, както ако е била получена от IRC сървър" #: src/common/outbound.c:2816 msgid "SAY , sends the text to the object in the current window" msgstr "SAY <текст>, праща текста към обекта в текущия прозорец" #: src/common/outbound.c:2819 msgid "SERVCHAN [-ssl] , connects and joins a channel" msgstr "SERVCHAN [-ssl] <хост> <порт> <стая>, свързва се и влиза в стая" #: src/common/outbound.c:2822 msgid "SERVCHAN , connects and joins a channel" msgstr "SERVCHAN <хост> <порт> <стая>, свързва се и влиза в стая" #: src/common/outbound.c:2826 msgid "SERVER [-ssl] [] [], connects to a server, the default port is 6667 for normal connections, and 9999 for ssl connections" msgstr "SERVER [-ssl] <хост> [<порт>] [<парола>], свързва се със сървър, стандартния порт е 6667 за нормални връзки и 9999 за SSL връзки" #: src/common/outbound.c:2829 msgid "SERVER [] [], connects to a server, the default port is 6667" msgstr "SERVER <хост> [<порт>] [<парола>], свързва се със сървър, стандартния порт е 6667" #: src/common/outbound.c:2831 msgid "SET [-quiet] []" msgstr "SET [-quiet] <променлива> [<стойност>]" #: src/common/outbound.c:2832 msgid "SETCURSOR [-|+]" msgstr "SETCURSOR [-|+]<позиция>, определя позицията на курсора" #: src/common/outbound.c:2836 msgid "TOPIC [], sets the topic if one is given, else shows the current topic" msgstr "TOPIC [<тема>], настройва темата ако е дадената такава, ако не-показва текущата" #: src/common/outbound.c:2838 msgid "UNBAN [...], unbans the specified masks." msgstr "UNBAN <маска> [<маска>...], маха забраната от избраните маски" #: src/common/outbound.c:2839 msgid "UNIGNORE [QUIET]" msgstr "" #: src/common/outbound.c:2840 msgid "UNLOAD , unloads a plugin or script" msgstr "UNLOAD <име>, отзарежда плъгин или скрипт" #: src/common/outbound.c:2841 msgid "URL , opens a URL in your browser" msgstr "URL , отваря URL-то в браузъра ви" #: src/common/outbound.c:2844 msgid "VOICE , gives voice status to someone (needs chanop)" msgstr "VOICE <прякор>, дава статуса \"voice\" на някой (изисква операторски статус в стаята)" #: src/common/outbound.c:2846 msgid "WALLCHAN , writes the message to all channels" msgstr "WALLCHAN <съобщение>, изпраща съобщението до всички канали" #: src/common/outbound.c:2848 msgid "WALLCHOP , sends the message to all chanops on the current channel" msgstr "WALLCHOP <съобщение>, изпраща съобщение до всички оператори в текущата стая" #: src/common/outbound.c:2881 #, c-format msgid "Usage: %s\n" msgstr "Употреба: %s\n" #: src/common/outbound.c:2886 msgid "" "\n" "No help available on that command.\n" msgstr "" "\n" "Няма налична помощ за тази команда.\n" #: src/common/outbound.c:2892 msgid "No such command.\n" msgstr "Няма такава команда.\n" #: src/common/outbound.c:3216 msgid "Bad arguments for user command.\n" msgstr "Грешни аргументи за потребителската команда.\n" #: src/common/outbound.c:3380 msgid "Too many recursive usercommands, aborting." msgstr "Прекалено много рекурсивни потребителски команди, прекъсва се..." #: src/common/outbound.c:3453 msgid "Unknown Command. Try /help\n" msgstr "Непозната команда. Опитайте /help\n" #: src/common/plugin.c:359 src/common/plugin.c:400 msgid "No xchat_plugin_init symbol; is this really an xchat plugin?" msgstr "Няма xchat_plugin_init символ; това наистина ли е X-Chat плъгин?" #: src/common/server.c:586 msgid "Are you sure this is a SSL capable server and port?\n" msgstr "Сигурни ли сте, че това е SSL сървър и правилния порт?\n" #: src/common/server.c:937 #, c-format msgid "" "Cannot resolve hostname %s\n" "Check your IP Settings!\n" msgstr "" "Не може да се разбере името на хоста %s\n" "Проверете вашите IP настройки!\n" #: src/common/server.c:942 msgid "Proxy traversal failed.\n" msgstr "Пренасянето към проксито пропадна.\n" #: src/common/servlist.c:644 #, c-format msgid "Cycling to next server in %s...\n" msgstr "Минава се към следващия сървър в %s...\n" #: src/common/servlist.c:1056 #, c-format msgid "Warning: \"%s\" character set is unknown. No conversion will be applied for network %s." msgstr "Внимание: Кодовата таблица \"%s\" е непозната. Няма да има преобразуване за мрежата %s." #: src/common/textevents.h:6 msgid "%C22*%O$t$1 added to notify list." msgstr "-%C10-%C11-%O$t$1 е добавен/а към списъка с приятели." #: src/common/textevents.h:9 msgid "%C22*%O$t$1 Banlist:%C19 $4%C20 $2%C21 $3" msgstr "%C22*%O$t$1 Списък със забраните:%C19 $4%C20 $2%C21 $3" #: src/common/textevents.h:12 msgid "%C22*%O$tCannot join%C26 %B$1 %O(You are banned)." msgstr "%C22*%O$tНе можете да влезнете в%C26 %B$1 %O(Забранен ви е достъпа)." #: src/common/textevents.h:18 msgid "%C22*%O$t$1 is now known as $2" msgstr "%C22*%O$t$1 прякора му/й сега е $2" #: src/common/textevents.h:21 msgid "%C18*$t$1%O $2" msgstr "%C18*$t$1%O $2" #: src/common/textevents.h:24 msgid "%C21*%O$t%C21%B$1%O%C21 $2" msgstr "%C21*%O$t%C21%B$1%O%C21 $2" #: src/common/textevents.h:27 msgid "%C22*%O$t$1 sets ban on $2" msgstr "%C22*%O$t$1 поставя забрана на $2" #: src/common/textevents.h:30 msgid "%C22*%O$tChannel $1 created on $2" msgstr "%C22*%O$tСтаята $1 е създадена на $2" #: src/common/textevents.h:33 msgid "%C22*%O$t%C26$1%O removes channel half-operator status from%C26 $2" msgstr "%C22*%O$t%C26$1%O·маха·полу-операторския·статус·на%C26 $2" #: src/common/textevents.h:36 msgid "%C22*%O$t%C26$1%O removes channel operator status from%C26 $2" msgstr "%C22*%O$t%C26$1%O·маха·операторския·статус·от·%C26 $2" #: src/common/textevents.h:39 msgid "%C22*%O$t%C26$1%O removes voice from%C26 $2" msgstr "%C22*%O$t%C26$1%O премахва поканите от%C26 $2" #: src/common/textevents.h:42 msgid "%C22*%O$t$1 sets exempt on $2" msgstr "%C22*%O$t$1 слага покани за $2" #: src/common/textevents.h:45 msgid "%C22*%O$t%C26$1%O gives channel half-operator status to%C26 $2" msgstr "%C22*%O$t%C26$1%O дава полу-операторски статус на %C26 $2" #: src/common/textevents.h:48 msgid "%C22*%O$t$1 sets invite on $2" msgstr "%C22*%O$t$1 слага покани за $2" #: src/common/textevents.h:51 msgid "%UChannel Users Topic" msgstr "%UСтая Потребители Тема" #: src/common/textevents.h:54 msgid "%C18%B%B$4$1%O%C18%O$t$2" msgstr "%C18%B%B$4$1%O%C18%O$t$2" #: src/common/textevents.h:57 msgid "%C22*%O$t$1 sets mode $2$3 $4" msgstr "%C22*%O$t$1 поставя режим $2$3 $4" #: src/common/textevents.h:60 msgid "%C22*%O$t%C22Channel $1 modes: $2" msgstr "%C22*%O$t%C22Стая $1 режими: $2" #: src/common/textevents.h:63 msgid "$4%C21%B$1%O$t%C21$2" msgstr "$4%C21%B$1%O$t%C21$2" #: src/common/textevents.h:66 msgid "%C28-%C29$1/$2%C28-%O$t$3" msgstr "%C28-%C29$1/$2%C28-%O$t$3" #: src/common/textevents.h:69 msgid "%C22*%O$t%C26$1%O gives channel operator status to%C26 $2" msgstr "%C22*%O$t%C26$1%O дава статус на оператор за стаята на%C26 $" #: src/common/textevents.h:72 msgid "%C22*%O$t$1 removes exempt on $2" msgstr "%C22*%O$t$1 маха exempt от $2" #: src/common/textevents.h:75 msgid "%C22*%O$t$1 removes invite on $2" msgstr "%C22*%O$t$1 премахва поканите от $2" #: src/common/textevents.h:78 msgid "%C22*%O$t$1 removes channel keyword" msgstr "%C22*%O$t$1 маха ключовата дума на стаята" #: src/common/textevents.h:81 msgid "%C22*%O$t$1 removes user limit" msgstr "%C22*%O$t$1 маха потребителския лимит" #: src/common/textevents.h:84 msgid "%C22*%O$t$1 sets channel keyword to $2" msgstr "%C22*%O$t$1 настройва ключовата дума на стаята на $2" #: src/common/textevents.h:87 msgid "%C22*%O$t$1 sets channel limit to $2" msgstr "%C22*%O$t$1 настройва лимита на стаята на $2" #: src/common/textevents.h:90 msgid "%C22*%O$t$1 removes ban on $2" msgstr "%C22*%O$t$1 маха забраната за $2" #: src/common/textevents.h:93 msgid "%C22*%O$t%C26$1%O gives voice to%C26 $2" msgstr "%C22*%O$t%C26$1%O дава статус \"Voice\" на%C26 $2" #: src/common/textevents.h:96 msgid "%C22*%O$t%C22Connected. Now logging in..." msgstr "%C22*%O$t%C22Връзката е осъществена. Сега се влиза..." #: src/common/textevents.h:99 msgid "%C22*%O$t%C22Connecting to $1 ($2) port $3%O..." msgstr "%C22*%O$t%C22Свързване с $1 ($2) порт $3%O..." #: src/common/textevents.h:102 msgid "%C21*%O$t%C21Connection failed. Error: $1" msgstr "%C21*%O$t%C21Връзката пропадна. Грешка: $1" #: src/common/textevents.h:105 msgid "%C22*%O$tReceived a CTCP $1 from $2" msgstr "%C22*%O$tПолучен CTCP $1 от $2" #: src/common/textevents.h:108 msgid "%C22*%O$tReceived a CTCP $1 from $2 (to $3)" msgstr "%C22*%O$tПолучен CTCP $1 от $2 (до $3)" #: src/common/textevents.h:111 msgid "%C19>%O$1%C19<%O$tCTCP $2" msgstr "%C19>%O$1%C19<%O$tCTCP $2" #: src/common/textevents.h:114 msgid "%C22*%O$tReceived a CTCP Sound $1 from $2" msgstr "%C22*%O$tПолучен CTCP звук $1 от $2" #: src/common/textevents.h:117 msgid "%C22*%O$tDCC CHAT to %C26$1%O aborted." msgstr "%C22*%O$tDCC разговор с %C26$1%O прекъснат." #: src/common/textevents.h:120 msgid "%C22*%O$tDCC CHAT connection established to %C26$1 %C30[%O$2%C30]" msgstr "%C22*%O$tDCC разговор осъществи връзка с %C26$1 %C30[%O$2%C30]" #: src/common/textevents.h:123 msgid "%C22*%O$tDCC CHAT to %C26$1%O lost ($4)." msgstr "%C22*%O$tDCC разговор с %C26$1%O е изгубен ($4)." #: src/common/textevents.h:126 msgid "%C22*%O$tReceived a DCC CHAT offer from $1" msgstr "%C22*%O$tПолучено предложение за DCC разговор от $1" #: src/common/textevents.h:129 msgid "%C22*%O$tOffering DCC CHAT to $1" msgstr "%C22*%O$tПредлагане на DCC разговор на $1" #: src/common/textevents.h:132 msgid "%C22*%O$tAlready offering CHAT to $1" msgstr "%C22*%O$tВече се предлага разговор на $1" #: src/common/textevents.h:135 msgid "%C22*%O$tDCC $1 connect attempt to%C26 $2%O failed (err=$3)." msgstr "%C22*%O$tDCC $1 опит за връзка към %C26·$2%O·пропадна (err=$3)." #: src/common/textevents.h:138 msgid "%C22*%O$tReceived '$1%O' from $2" msgstr "%C22*%O$tПолучено '$1%O' от $2" #: src/common/textevents.h:141 #, c-format msgid "%C24,18 Type To/From Status Size Pos File " msgstr "%C24,18 Вид До/От Статус Размер Позиция Файл " #: src/common/textevents.h:144 msgid "%C22*%O$tReceived a malformed DCC request from %C26$1%O.%010%C22*%O$tContents of packet: $2" msgstr "%C22*%O$tПолучи грешно DCC искане от %C26$1%O.%010%C22*%O$tСъдържание на пакета: $2" #: src/common/textevents.h:147 msgid "%C22*%O$tOffering%C26 $1%O to%C26 $2" msgstr "%C22*%O$tПредлага се%C26 $1%O на%C26 $2" #: src/common/textevents.h:150 msgid "%C22*%O$tNo such DCC offer." msgstr "%C22*%O$tНяма такова DCC предложение." #: src/common/textevents.h:153 msgid "%C22*%O$tDCC RECV%C26 $2%O to%C26 $1%O aborted." msgstr "%C22*%O$tDCC Получаване %C26·$2%O до %C26·$1%O е прекъснато." #: src/common/textevents.h:156 msgid "%C22*%O$tDCC RECV%C26 $1%O from%C26 $3%O complete %C30[%C26$4%O cps%C30]%O." msgstr "%C22*%O$tDCC получаване %C26·$1%O от %C26·$3%O завърши %C30[%C26$4%O·cps%C30]%O." #: src/common/textevents.h:159 msgid "%C22*%O$tDCC RECV connection established to%C26 $1 %C30[%O$2%C30]" msgstr "%C22*%O$tDCC получаване осъществи връзка с %C26 $1 %C30[%O$2%C30]" #: src/common/textevents.h:162 msgid "%C22*%O$tDCC RECV%C26 $1%O from%C26 $3%O failed ($4)." msgstr "%C22*%O$tDCC получаване %C26·$1%O от %C26·$3%O пропадна. ($4)." #: src/common/textevents.h:165 msgid "%C22*%O$tDCC RECV: Cannot open $1 for writing ($2)." msgstr "%C22*%O$tDCC Получаване: Не може да отвори $1 за запис ($2)." #: src/common/textevents.h:168 msgid "%C22*%O$tThe file%C26 $1%C already exists, saving it as%C26 $2%O instead." msgstr "%C22*%O$tФайлът %C26·$1%C вече съществува, вместо това се записва като %C26·$2%O." #: src/common/textevents.h:171 msgid "%C22*%O$t%C26$1 %Ohas requested to resume%C26 $2 %Cfrom%C26 $3%C." msgstr "%C22*%O$t%C26$1 %Oпоиска да продължи %C26·$2·%Cот %C26 $3%C." #: src/common/textevents.h:174 msgid "%C22*%O$tDCC SEND%C26 $2%O to%C26 $1%O aborted." msgstr "%C22*%O$tDCC изпращане %C26·$2%O·до %C26·$1%O е прекъснато." #: src/common/textevents.h:177 msgid "%C22*%O$tDCC SEND%C26 $1%O to%C26 $2%O complete %C30[%C26$3%O cps%C30]%O." msgstr "%C22*%O$tDCC изпращане %C26·$1%O до %C26 $2%O завърши %C30[%C26$3%O cps%C30]%O." #: src/common/textevents.h:180 msgid "%C22*%O$tDCC SEND connection established to%C26 $1 %C30[%O$2%C30]" msgstr "%C22*%O$tDCC изпращане осъществи връзка с %C26 $1 %C30[%O$2%C30]" #: src/common/textevents.h:183 msgid "%C22*%O$tDCC SEND%C26 $1%O to%C26 $2%O failed. $3" msgstr "%C22*%O$tDCC изпращане %C26·$1%O до %C26·$2%O пропадна. $3" #: src/common/textevents.h:186 msgid "%C22*%O$t%C26$1 %Ohas offered%C26 $2 %O(%C26$3 %Obytes)" msgstr "%C22*%O$t%C26$1·%Oе предложил %C26·$2·%O(%C26$3·%Oбайта)" #: src/common/textevents.h:189 msgid "%C22*%O$tDCC $1%C26 $2 %Oto%C26 $3 %Cstalled - aborting." msgstr "%C22*%O$tDCC $1%C26·$2·%Oдо %C26·$3·%Cе спряло - прекъсва." #: src/common/textevents.h:192 msgid "%C22*%O$tDCC $1%C26 $2 %Oto%C26 $3 %Otimed out - aborting." msgstr "%C22*%O$tDCC $1%C26·$2·%Oдо %C26·$3·%Oе спряло - прекъсва." #: src/common/textevents.h:195 msgid "%C22*%O$t$1 deleted from notify list." msgstr "%C22*%O$t$1 е изтрит/а от списъка с приятелчетата." #: src/common/textevents.h:198 msgid "%C22*%O$tDisconnected ($1)." msgstr "%C22*%O$t$1Връзката е прекъсната ($1)." #: src/common/textevents.h:201 msgid "%C22*%O$tFound your IP: [$1]" msgstr "%C22*%O$tВашето IP е намерено: [$1]" #: src/common/textevents.h:204 msgid "$1$t$2" msgstr "$1$t$2" #: src/common/textevents.h:207 msgid "%O%C26$1%O added to ignore list." msgstr "%O%C26$1%O е добавен/а в списъка с игнорираните" #: src/common/textevents.h:210 msgid "Ignore on %C26$1%O changed." msgstr "Игнорирането на %C26$1%O беше променено." #: src/common/textevents.h:213 #, c-format msgid "%C24,18 " msgstr "%C24,18 " #: src/common/textevents.h:216 #, c-format msgid "%C24,18 Hostmask PRIV NOTI CHAN CTCP DCC INVI UNIG " msgstr "" #: src/common/textevents.h:219 msgid "%O%C26$1%O removed from ignore list." msgstr "%O%C26$1%O е махнат/а от списъка с игнорираните." #: src/common/textevents.h:222 msgid " Ignore list is empty." msgstr " Списъка с игнорираните е празен." #: src/common/textevents.h:225 msgid "%C22*%O$tCannot join%C26 %B$1 %O(Channel is invite only)." msgstr "%C22*%O$tНе може да се влезне в%C26·%B$1·%O(Стаята е само с покани)." #: src/common/textevents.h:228 msgid "%C22*%O$tYou have been invited to%C26 $1%O by%C26 $2%C (%C26$3%C)" msgstr "%C22*%O$tБяхте поканени в %C26·$1%O от %C26 $2%C (%C26$3%C)" #: src/common/textevents.h:231 msgid "%C19*%O$t%C19%B$1 %B($3) has joined $2" msgstr "%C19*%O$t%C19%B$1 %B($3) влезна в $2" #: src/common/textevents.h:234 msgid "%C22*%O$tCannot join%C26 %B$1 %O(Requires keyword)." msgstr "%C22*%O$tНе може да се влезне в%C26 %B$1 %O(Нужна е ключова дума)." #: src/common/textevents.h:237 msgid "%C21*%O$t%C21$1 has kicked $2 from $3 ($4%O%C21)" msgstr "%C21*%O$t%C21$1 изхвърли $2 от $3 ($4%O%C21)" #: src/common/textevents.h:240 msgid "%C22*%O$tYou have been killed by $1 ($2%O%C22)" msgstr "%C22*%O$tБяхте убит/а от $1 ($2%O%C22)" #: src/common/textevents.h:243 msgid "%C19>%O$1%C19<%O$t$2%O" msgstr "%C19>%O$1%C19<%O$t$2%O" #: src/common/textevents.h:246 msgid "%C16*%O$t$1%O" msgstr "%C16*%O$t$1%O" #: src/common/textevents.h:249 msgid "%C22*%O$t%C22MOTD Skipped." msgstr "%C22*%O$t%C22Съобщението за деня е пропуснато." #: src/common/textevents.h:252 msgid "%C22*%O$t$1 already in use. Retrying with $2..." msgstr "%C22*%O$t$1 вече е зает. Опитва се отново с $2..." #: src/common/textevents.h:255 msgid "%C22*%O$tNickname already in use. Use /NICK to try another." msgstr "%C22*%O$tПрякора е вече зает. Използвайте /NICK ,за да опитате с друг." #: src/common/textevents.h:258 msgid "%C22*%O$tNo such DCC." msgstr "%C22*%O$tНяма такова DCC" #: src/common/textevents.h:261 msgid "%C22*%O$tNo process is currently running" msgstr "%C22*%O$tНяма текущ вървящ процес" #: src/common/textevents.h:264 msgid "%C28-%C29$1%C28-%O$t$2" msgstr "%C28-%C29$1%C28-%O$t$2" #: src/common/textevents.h:267 msgid "%C19>%O$1%C19<%O$t$2" msgstr "%C19>%O$1%C19<%O$t$2" #: src/common/textevents.h:270 msgid "$tNotify list is empty." msgstr "$tСписъка с приятелчета е празен." #: src/common/textevents.h:273 msgid "%C24,18 %B Notify List " msgstr "%C24,18 %B Списък с приятелчета " #: src/common/textevents.h:276 msgid "%C22*%O$t$1 users in notify list." msgstr "%C22*%O$t$1 потребителя в списъка с приятелчета." #: src/common/textevents.h:279 msgid "%C22*%O$tNotify: $1 is offline ($2)." msgstr "%C22*%O$tУведомяване: $1 вече не е на линия ($2)." #: src/common/textevents.h:282 msgid "%C22*%O$tNotify: $1 is online ($2)." msgstr "%C22*%O$tУведомяване: $1 е на линия ($2)." #: src/common/textevents.h:288 msgid "%C23*%O$t%C23$1 (%O%C23$2) has left $3" msgstr "%C23*%O$t%C23$1 (%O%C23$2) излезна от $3" #: src/common/textevents.h:291 msgid "%C23*%O$t%C23$1 (%O%C23$2) has left $3 (%O%C23$4)" msgstr "%C23*%O$t%C23$1 (%O%C23$2) излезна от $3 (%O%C23$4)" #: src/common/textevents.h:294 msgid "%C22*%O$tPing reply from $1: $2 second(s)" msgstr "%C22*%O$tПинг отговор от $1 : $2 секунда/и" #: src/common/textevents.h:297 msgid "%C22*%O$tNo ping reply for $1 seconds, disconnecting." msgstr "%C22*%O$tНямаше отговор от пинга за $1 секунди, прекъсване на връзката" #: src/common/textevents.h:300 msgid "%C28*%C29$3$1%C28*$t%O$2" msgstr "%C28*%C29$3$1%C28*$t%O$2" #: src/common/textevents.h:303 msgid "%C18%B%B$3$1%O$t$2" msgstr "%C18%B%B$3$1%O$t$2" #: src/common/textevents.h:306 msgid "%C22*%O$tA process is already running" msgstr "%C22*%O$tA - процеса вече върви" #: src/common/textevents.h:309 msgid "%C23*%O$t%C23$1 has quit (%O%C23$2)" msgstr "%C23*%O$t%C23$1 излезна от IRC (%O%C23$2)" #: src/common/textevents.h:312 msgid "%C22*%O$t$1 sets modes%B %C30[%O$2%B%C30]" msgstr "%C22*%O$t$1 поставя режими%B %C30[%O$2%B%C30]" #: src/common/textevents.h:315 msgid "%C28-%C29$1/Wallops%C28-%O$t$2" msgstr "%C28-%C29$1/Wallop съобщения%C28-%O$t$2" #: src/common/textevents.h:318 msgid "%C22*%O$tLooking up IP number for%C26 $1%O..." msgstr "%C22*%O$tТърсене на IP номера заr%C26 $1%O..." #: src/common/textevents.h:321 msgid "%C22*%O$t%C22Connected." msgstr "%C22*%O$t%C22Връзката е осъществена." #: src/common/textevents.h:324 src/common/textevents.h:330 #: src/common/textevents.h:333 msgid "%C22*%O$t$1" msgstr "%C22*%O$t$1" #: src/common/textevents.h:327 msgid "%C22*%O$t%C22Looking up $1" msgstr "%C22*%O$t%C22Търсене... $1" #: src/common/textevents.h:336 msgid "%C22*%O$tStopped previous connection attempt (pid=$1)" msgstr "%C22*%O$tПредишния опит за връзка спрян (pid=$1)" #: src/common/textevents.h:339 msgid "%C29*%O$t%C29Topic for $1%C %C29is: $2" msgstr "%C29*%O$t%C29Темата на $1%C %C29е: $2" #: src/common/textevents.h:342 msgid "%C22*%O$t$1 has changed the topic to: $2" msgstr "%C22*%O$t$1 смени темата на: $2" #: src/common/textevents.h:345 msgid "%C29*%O$t%C29Topic for $1%C %C29set by $2%C %C29at $3" msgstr "%C29*%O$t%C29Темата на $1%C %C29е настроена от $2%C %C29на $3" #: src/common/textevents.h:348 msgid "%C22*%O$tUnknown host. Maybe you misspelled it?" msgstr "%C22*%O$tНепознат хост. Може би сте направили грешка при изписването?" #: src/common/textevents.h:351 msgid "%C22*%O$tCannot join%C26 %B$1 %O(User limit reached)." msgstr "%C22*%O$tНе може да се влезне в%C26 %B$1 %O(Достигнат е потребителският лимит)." #: src/common/textevents.h:354 msgid "%C22*%O$t%C26Users on $1:%C $2" msgstr "%C22*%O$t%C26Потребителя в $1:%C $2" #: src/common/textevents.h:357 msgid "%C22*%O$t%C28[%O$1%C28] %O$2%C27 $3" msgstr "%C22*%O$t%C28[%O$1%C28] %O$2%C27 $3" #: src/common/textevents.h:360 msgid "%C22*%O$t%C28[%O$1%C28] %Cis away %C30(%O$2%O%C30)" msgstr "%C22*%O$t%C28[%O$1%C28] %Cотсъства %C30(%O$2%O%C30)" #: src/common/textevents.h:363 src/common/textevents.h:369 #: src/common/textevents.h:384 src/common/textevents.h:387 msgid "%C22*%O$t%C28[%O$1%C28]%O $2" msgstr "%C22*%O$t%C28[%O$1%C28]%O $2" #: src/common/textevents.h:366 msgid "%C22*%O$t%C28[%O$1%C28] %OEnd of WHOIS list." msgstr "%C22*%O$t%C28[%O$1%C28] %OКрай на \"Кой е...?\" информацията." #: src/common/textevents.h:372 msgid "%C22*%O$t%C28[%O$1%C28]%O idle%C26 $2" msgstr "%C22*%O$t%C28[%O$1%C28]%O неактивност%C26 $2" #: src/common/textevents.h:375 msgid "%C22*%O$t%C28[%O$1%C28]%O idle%C26 $2%O, signon:%C26 $3" msgstr "%C22*%O$t%C28[%O$1%C28]%O неактивност%C26 $2%O, включил/а се на:%C26 $3" #: src/common/textevents.h:378 msgid "%C22*%O$t%C28[%O$1%C28] %C30(%O$2@$3%C30)%O: $4" msgstr "%C22*%O$t%C28[%O$1%C28] %C30(%O$2@$3%C30)%O: $4" #: src/common/textevents.h:381 msgid "%C22*%O$t%C28[%O$1%C28] %Oreal user@host%C27 $2%O, real IP%C27 $3" msgstr "%C22*%O$t%C28[%O$1%C28] %Oистински потребител@хост%C27 $2%O, реално IP%C27 $3" #: src/common/textevents.h:390 msgid "%C19*%O$t%C19Now talking on $2" msgstr "%C19*%O$t%C19Сега говорите в $2" #: src/common/textevents.h:393 msgid "%C23*$tYou have been kicked from $2 by $3 ($4%O%C23)" msgstr "%C23*$tБяхте изхвърлени от стаята $2 от $3 ($4%O%C23)" #: src/common/textevents.h:396 #, c-format msgid "%C23*$tYou have left channel $3" msgstr "%C23*$tНапуснахте стаята $3" #: src/common/textevents.h:399 msgid "%C23*$tYou have left channel $3 (%O%C23$4%O%C23)" msgstr "%C23*$tНапуснахте стаята $3 (%O%C23$4%O%C23)" #: src/common/textevents.h:402 msgid "%C22*%O$tYou've invited%C26 $1%O to%C26 $2%O (%C26$3%O)" msgstr "%C22*%O$tПоканихте%C26 $1%O в%C26 $2%O (%C26$3%O)" #: src/common/textevents.h:405 msgid "%C31%B%B$4$1%O$t%C30$2" msgstr "%C31%B%B$4$1%O$t%C30$2" #: src/common/textevents.h:408 msgid "%C22*%O$tYou are now known as $2" msgstr "-%C10-%C11-%O$tНовият ви прякор е $2" #: src/common/text.c:207 #, c-format msgid "**** ENDING LOGGING AT %s\n" msgstr "**** КРАЙ НА ЗАПИСВАНЕ НА РАЗГОВОРА В %s\n" #: src/common/text.c:325 #, c-format msgid "**** BEGIN LOGGING AT %s\n" msgstr "**** НАЧАЛО НА ЗАПИСВАНЕ НА РАЗГОВОРА В %s\n" #: src/common/text.c:344 #, c-format msgid "" "* Can't open log file(s) for writing. Check the\n" " permissions on %s/xchatlogs" msgstr "" "* Не може да се пише във файла за записване на разговорите.\n" " Проверете правата за %s/xchatlogs" #: src/common/text.c:559 msgid "Left message" msgstr "Ляво съобщение" #: src/common/text.c:560 msgid "Right message" msgstr "Дясно съобщение" #: src/common/text.c:564 msgid "The nick of the joining person" msgstr "Прякора на човека, който влиза" #: src/common/text.c:565 msgid "The channel being joined" msgstr "Стаята, в която се влиза" #: src/common/text.c:566 src/common/text.c:611 src/common/text.c:668 msgid "The host of the person" msgstr "Хоста на човека" #: src/common/text.c:570 src/common/text.c:575 src/common/text.c:582 #: src/common/text.c:649 src/common/text.c:774 src/common/text.c:781 #: src/common/text.c:786 src/common/text.c:791 src/common/text.c:796 #: src/common/text.c:802 src/common/text.c:807 src/common/text.c:811 #: src/common/text.c:817 src/common/text.c:823 src/common/text.c:869 #: src/common/text.c:878 src/common/text.c:883 src/common/text.c:888 #: src/common/text.c:897 src/common/text.c:908 src/common/text.c:915 #: src/common/text.c:921 src/common/text.c:926 src/common/text.c:931 #: src/common/text.c:938 src/common/text.c:944 src/common/text.c:950 #: src/common/text.c:955 src/common/text.c:960 src/common/text.c:964 #: src/common/text.c:970 src/common/text.c:978 src/common/text.c:1012 #: src/common/text.c:1017 msgid "Nickname" msgstr "Прякор" #: src/common/text.c:571 msgid "The action" msgstr "Действието" #: src/common/text.c:576 msgid "The text" msgstr "Текстът" #: src/common/text.c:577 msgid "Mode char" msgstr "" #: src/common/text.c:578 src/common/text.c:651 msgid "Identified text" msgstr "" #: src/common/text.c:583 src/common/text.c:639 src/common/text.c:645 #: src/common/text.c:650 msgid "The message" msgstr "Съобщението" #: src/common/text.c:587 src/common/text.c:655 msgid "Old nickname" msgstr "Стар прякор" #: src/common/text.c:588 src/common/text.c:656 msgid "New nickname" msgstr "Нов прякор" #: src/common/text.c:592 msgid "Nick of person who changed the topic" msgstr "Прякорът на човека, който смени темата" #: src/common/text.c:593 src/common/text.c:599 src/fe-gtk/chanlist.c:599 #: src/fe-gtk/chanlist.c:700 msgid "Topic" msgstr "Тема" #: src/common/text.c:594 src/common/text.c:598 src/common/text.c:1032 #: src/fe-gtk/chanlist.c:597 src/fe-gtk/chanlist
/* X-Chat
 * Copyright (C) 1998 Peter Zelezny.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 */

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>

#define WANTSOCKET
#include "inet.h"

#ifdef WIN32
#include <windows.h>
#else
#include <sys/wait.h>
#include <signal.h>
#include <unistd.h>
#endif

#include "hexchat.h"
#include "fe.h"
#include "util.h"
#include "cfgfiles.h"
#include "chanopt.h"
#include "ignore.h"
#include "hexchat-plugin.h"
#include "plugin.h"
#include "plugin-timer.h"
#include "notify.h"
#include "server.h"
#include "servlist.h"
#include "outbound.h"
#include "text.h"
#include "url.h"
#include "hexchatc.h"

#if ! GLIB_CHECK_VERSION (2, 36, 0)
#include <glib-object.h>			/* for g_type_init() */
#endif

#ifdef USE_OPENSSL
#include <openssl/ssl.h>			/* SSL_() */
#include "ssl.h"
#endif

#ifdef USE_MSPROXY
#include "msproxy.h"
#endif

#ifdef USE_LIBPROXY
#include <proxy.h>
#endif

GSList *popup_list = 0;
GSList *button_list = 0;
GSList *dlgbutton_list = 0;
GSList *command_list = 0;
GSList *ctcp_list = 0;
GSList *replace_list = 0;
GSList *sess_list = 0;
GSList *dcc_list = 0;
GSList *ignore_list = 0;
GSList *usermenu_list = 0;
GSList *urlhandler_list = 0;
GSList *tabmenu_list = 0;

/*
 * This array contains 5 double linked lists, one for each priority in the
 * "interesting session" queue ("channel" stands for everything but
 * SESS_DIALOG):
 *
 * [0] queries with hilight
 * [1] queries
 * [2] channels with hilight
 * [3] channels with dialogue
 * [4] channels with other data
 *
 * Each time activity happens the corresponding session is put at the
 * beginning of one of the lists.  The aim is to be able to switch to the
 * session with the most important/recent activity.
 */
GList *sess_list_by_lastact[5] = {NULL, NULL, NULL, NULL, NULL};


static int in_hexchat_exit = FALSE;
int hexchat_is_quitting = FALSE;
/* command-line args */
int arg_dont_autoconnect = FALSE;
int arg_skip_plugins = FALSE;
char *arg_url = NULL;
char **arg_urls = NULL;
char *arg_command = NULL;
gint arg_existing = FALSE;

#ifdef USE_DBUS
#include "dbus/dbus-client.h"
#include "dbus/dbus-plugin.h"
#endif /* USE_DBUS */

struct session *current_tab;
struct session *current_sess = 0;
struct hexchatprefs prefs;

#ifdef USE_OPENSSL
SSL_CTX *ctx = NULL;
#endif

#ifdef USE_LIBPROXY
pxProxyFactory *libproxy_factory;
#endif

/*
 * Update the priority queue of the "interesting sessions"
 * (sess_list_by_lastact).
 */
void
lastact_update(session *sess)
{
	int oldidx = sess->lastact_idx;
	int newidx = LACT_NONE;
	int dia = (sess->type == SESS_DIALOG);

	if (sess->nick_said)
		newidx = dia? LACT_QUERY_HI: LACT_CHAN_HI;
	else if (sess->msg_said)
		newidx = dia? LACT_QUERY: LACT_CHAN;
	else if (sess->new_data)
		newidx = dia? LACT_QUERY: LACT_CHAN_DATA;

	/* If already first at the right position, just return */
	if (oldidx == newidx &&
		 (newidx == LACT_NONE || g_list_index(sess_list_by_lastact[newidx], sess) == 0))
		return;

	/* Remove from the old position */
	if (oldidx != LACT_NONE)
		sess_list_by_lastact[oldidx] = g_list_remove(sess_list_by_lastact[oldidx], sess);

	/* Add at the new position */
	sess->lastact_idx = newidx;
	if (newidx != LACT_NONE)
		sess_list_by_lastact[newidx] = g_list_prepend(sess_list_by_lastact[newidx], sess);
	return;
}

/*
 * Extract the first session from the priority queue of sessions with recent
 * activity. Return NULL if no such session can be found.
 *
 * If filter is specified, skip a session if filter(session) returns 0. This
 * can be used for UI-specific needs, e.g. in fe-gtk we want to filter out
 * detached sessions.
 */
session *
lastact_getfirst(int (*filter) (session *sess))
{
	int i;
	session *sess = NULL;
	GList *curitem;

	/* 5 is the number of priority classes LACT_ */
	for (i = 0; i < 5 && !sess; i++)
	{
		curitem = sess_list_by_lastact[i];
		while (curitem && !sess)
		{
			sess = g_list_nth_data(curitem, 0);
			if (!sess || (filter && !filter(sess)))
			{
				sess = NULL;
				curitem = g_list_next(curitem);
			}
		}

		if (sess)
		{
			sess_list_by_lastact[i] = g_list_remove(sess_list_by_lastact[i], sess);
			sess->lastact_idx = LACT_NONE;
		}
	}
	
	return sess;
}

int
is_session (session * sess)
{
	return g_slist_find (sess_list, sess) ? 1 : 0;
}

session *
find_dialog (server *serv, char *nick)
{
	GSList *list = sess_list;
	session *sess;

	while (list)
	{
		sess = list->data;
		if (sess->server == serv && sess->type == SESS_DIALOG)
		{
			if (!serv->p_cmp (nick, sess->channel))
				return (sess);
		}
		list = list->next;
	}
	return 0;
}

session *
find_channel (server *serv, char *chan)
{
	session *sess;
	GSList *list = sess_list;
	while (list)
	{
		sess = list->data;
		if ((!serv || serv == sess->server) && sess->type == SESS_CHANNEL)
		{
			if (!serv->p_cmp (chan, sess->channel))
				return sess;
		}
		list = list->next;
	}
	return 0;
}

static void
lagcheck_update (void)
{
	server *serv;
	GSList *list = serv_list;
	
	if (!prefs.hex_gui_lagometer)
		return;

	while (list)
	{
		serv = list->data;
		if (serv->lag_sent)
			fe_set_lag (serv, -1);

		list = list->next;
	}
}

void
lag_check (void)
{
	server *serv;
	GSList *list = serv_list;
	unsigned long tim;
	char tbuf[128];
	time_t now = time (0);
	int lag;

	tim = make_ping_time ();

	while (list)
	{
		serv = list->data;
		if (serv->connected && serv->end_of_motd)
		{
			lag = now - serv->ping_recv;
			if (prefs.hex_net_ping_timeout && lag > prefs.hex_net_ping_timeout && lag > 0)
			{
				sprintf (tbuf, "%d", lag);
				EMIT_SIGNAL (XP_TE_PINGTIMEOUT, serv->server_session, tbuf, NULL,
								 NULL, NULL, 0);
				if (prefs.hex_net_auto_reconnect)
					serv->auto_reconnect (serv, FALSE, -1);
			} else
			{
				snprintf (tbuf, sizeof (tbuf), "LAG%lu", tim);
				serv->p_ping (serv, "", tbuf);
				
				if (!serv->lag_sent)
				{
					serv->lag_sent = tim;
					fe_set_lag (serv, -1);
				}
			}
		}
		list = list->next;
	}
}

static int
away_check (void)
{
	session *sess;
	GSList *list;
	int full, sent, loop = 0;

	if (!prefs.hex_away_track)
		return 1;

doover:
	/* request an update of AWAY status of 1 channel every 30 seconds */
	full = TRUE;
	sent = 0;	/* number of WHOs (users) requested */
	list = sess_list;
	while (list)
	{
		sess = list->data;

		if (sess->server->connected &&
			 sess->type == SESS_CHANNEL &&
			 sess->channel[0] &&
			 (sess->total <= prefs.hex_away_size_max || !prefs.hex_away_size_max))
		{
			if (!sess->done_away_check)
			{
				full = FALSE;

				/* if we're under 31 WHOs, send another channels worth */
				if (sent < 31 && !sess->doing_who)
				{
					sess->done_away_check = TRUE;
					sess->doing_who = TRUE;
					/* this'll send a WHO #channel */
					sess->server->p_away_status (sess->server, sess->channel);
					sent += sess->total;
				}
			}
		}

		list = list->next;
	}

	/* done them all, reset done_away_check to FALSE and start over unless we have away-notify */
	if (full)
	{
		list = sess_list;
		while (list)
		{
			sess = list->data;
			if (!sess->server->have_awaynotify)
				sess->done_away_check = FALSE;
			list = list->next;
		}
		loop++;
		if (loop < 2)
			goto doover;
	}

	return 1;
}

static int
hexchat_misc_checks (void)		/* this gets called every 1/2 second */
{
	static int count = 0;
#ifdef USE_MSPROXY
	static int count2 = 0;
#endif

	count++;

	lagcheck_update ();			/* every 500ms */

	if (count % 2)
		dcc_check_timeouts ();	/* every 1 second */

	if (count >= 60)				/* every 30 seconds */
	{
		if (prefs.hex_gui_lagometer)
			lag_check ();
		count = 0;
	}

#ifdef USE_MSPROXY	
	count2++;
	if (count2 >= 720)			/* 720 every 6 minutes */
	{
		msproxy_keepalive ();
		count2 = 0;
	}
#endif

	return 1;
}

/* executed when the first irc window opens */

static void
irc_init (session *sess)
{
	static int done_init = FALSE;
	char *buf;
	int i;

	if (done_init)
		return;

	done_init = TRUE;

	plugin_add (sess, NULL, NULL, timer_plugin_init, NULL, NULL, FALSE);

#ifdef USE_PLUGIN
	if (!arg_skip_plugins)
		plugin_auto_load (sess);	/* autoload ~/.xchat *.so */
#endif

#ifdef USE_DBUS
	plugin_add (sess, NULL, NULL, dbus_plugin_init, NULL, NULL, FALSE);
#endif

	if (prefs.hex_notify_timeout)
		notify_tag = fe_timeout_add (prefs.hex_notify_timeout * 1000,
											  notify_checklist, 0);

	fe_timeout_add (prefs.hex_away_timeout * 1000, away_check, 0);
	fe_timeout_add (500, hexchat_misc_checks, 0);

	if (arg_url != NULL)
	{
		buf = g_strdup_printf ("server %s", arg_url);
		g_free (arg_url);	/* from GOption */
		handle_command (sess, buf, FALSE);
		g_free (buf);
	}
	
	if (arg_urls != NULL)
	{
		for (i = 0; i < g_strv_length(arg_urls); i++)
		{
			buf = g_strdup_printf ("%s %s", i==0? "server" : "newserver", arg_urls[i]);
			handle_command (sess, buf, FALSE);
			g_free (buf);
		}
		g_strfreev (arg_urls);
	}

	if (arg_command != NULL)
	{
		handle_command (sess, arg_command, FALSE);
		g_free (arg_command);
	}

	/* load -e <xdir>/startup.txt */
	load_perform_file (sess, "startup.txt");
}

static session *
session_new (server *serv, char *from, int type, int focus)
{
	session *sess;

	sess = malloc (sizeof (struct session));
	if (sess == NULL)
	{
		return NULL;
	}
	memset (sess, 0, sizeof (struct session));

	sess->server = serv;
	sess->logfd = -1;
	sess->scrollfd = -1;
	sess->type = type;

	sess->alert_beep = SET_DEFAULT;
	sess->alert_taskbar = SET_DEFAULT;
	sess->alert_tray = SET_DEFAULT;

	sess->text_hidejoinpart = SET_DEFAULT;
	sess->text_logging = SET_DEFAULT;
	sess->text_scrollback = SET_DEFAULT;
	sess->text_strip = SET_DEFAULT;

	sess->lastact_idx = LACT_NONE;

	if (from != NULL)
		safe_strcpy (sess->channel, from, CHANLEN);

	sess_list = g_slist_prepend (sess_list, sess);

	fe_new_window (sess, focus);

	return sess;
}

session *
new_ircwindow (server *serv, char *name, int type, int focus)
{
	session *sess;

	switch (type)
	{
	case SESS_SERVER:
		serv = server_new ();
		if (prefs.hex_gui_tab_server)
			sess = session_new (serv, name, SESS_SERVER, focus);
		else
			sess = session_new (serv, name, SESS_CHANNEL, focus);
		serv->server_session = sess;
		serv->front_session = sess;
		break;
	case SESS_DIALOG:
		sess = session_new (serv, name, type, focus);
		log_open_or_close (sess);
		break;
	default:
/*	case SESS_CHANNEL:
	case SESS_NOTICES:
	case SESS_SNOTICES:*/
		sess = session_new (serv, name, type, focus);
		break;
	}

	irc_init (sess);
	chanopt_load (sess);
	scrollback_load (sess);
	if (sess->scrollwritten && sess->scrollback_replay_marklast)
		sess->scrollback_replay_marklast (sess);
	plugin_emit_dummy_print (sess, "Open Context");

	return sess;
}

static void
exec_notify_kill (session * sess)
{
#ifndef WIN32
	struct nbexec *re;
	if (sess->running_exec != NULL)
	{
		re = sess->running_exec;
		sess->running_exec = NULL;
		kill (re->childpid, SIGKILL);
		waitpid (re->childpid, NULL, WNOHANG);
		fe_input_remove (re->iotag);
		close (re->myfd);
		if (re->linebuf)
			free(re->linebuf);
		free (re);
	}
#endif
}

static void
send_quit_or_part (session * killsess)
{
	int willquit = TRUE;
	GSList *list;
	session *sess;
	server *killserv = killsess->server;

	/* check if this is the last session using this server */
	list = sess_list;
	while (list)
	{
		sess = (session *) list->data;
		if (sess->server == killserv && sess != killsess)
		{
			willquit = FALSE;
			list = 0;
		} else
			list = list->next;
	}

	if (hexchat_is_quitting)
		willquit = TRUE;

	if (killserv->connected)
	{
		if (willquit)
		{
			if (!killserv->sent_quit)
			{
				killserv->flush_queue (killserv);
				server_sendquit (killsess);
				killserv->sent_quit = TRUE;
			}
		} else
		{
			if (killsess->type == SESS_CHANNEL && killsess->channel[0] &&
				 !killserv->sent_quit)
			{
				server_sendpart (killserv, killsess->channel, 0);
			}
		}
	}
}

void
session_free (session *killsess)
{
	server *killserv = killsess->server;
	session *sess;
	GSList *list;
	int oldidx;

	plugin_emit_dummy_print (killsess, "Close Context");

	if (current_tab == killsess)
		current_tab = NULL;

	if (killserv->server_session == killsess)
		killserv->server_session = NULL;

	if (killserv->front_session == killsess)
	{
		/* front_session is closed, find a valid replacement */
		killserv->front_session = NULL;
		list = sess_list;
		while (list)
		{
			sess = (session *) list->data;
			if (sess != killsess && sess->server == killserv)
			{
				killserv->front_session = sess;
				if (!killserv->server_session)
					killserv->server_session = sess;
				break;
			}
			list = list->next;
		}
	}

	if (!killserv->server_session)
		killserv->server_session = killserv->front_session;