diff --git a/bot_google.info b/bot_google.info
index 86466ea..fc0ef02 100644
--- a/bot_google.info
+++ b/bot_google.info
@@ -3,4 +3,5 @@ name = Bot Google
 package = Bot
 description = "Search in Google directly in IRC."
 dependencies[] = bot
-core = 6.x
+core = 7.x
+files[] = bot_google.module
diff --git a/bot_google.module b/bot_google.module
index a13e8c9..035596f 100644
--- a/bot_google.module
+++ b/bot_google.module
@@ -7,7 +7,7 @@
  */
 
 /**
- * Implementation of hook_help().
+ * Implements hook_help().
  */
 function bot_google_help($path, $args) {
   switch ($path) {
@@ -43,7 +43,7 @@ function bot_google_irc_msg_channel($data, $from_query = FALSE) {
 }
 
 function bot_google_execute_calculator($to, $amount, $from_unit, $to_unit) {
-  $query = drupal_query_string_encode(array(
+  $query = drupal_http_build_query(array(
     'hl' => 'en',
     'q' => "$amount$from_unit=?$to_unit",
   ));
@@ -68,11 +68,11 @@ function bot_google_execute_calculator($to, $amount, $from_unit, $to_unit) {
 function bot_google_execute_search($to, $keywords) {
   $search = bot_google_search($keywords);
   if (!empty($search[0]->url)) {
-    $output = t("@title => @url - more results: @more", 
+    $output = t("@title => @url - more results: @more",
       array(
         '@title' => truncate_utf8($search[0]->titleNoFormatting, 40, TRUE, TRUE),
         '@url' => $search[0]->url,
-        '@more' => "http://google.com/search?" . drupal_query_string_encode(array('q' => $keywords)),
+        '@more' => "http://google.com/search?" . drupal_http_build_query(array('q' => $keywords)),
       )
     );
   }
@@ -93,7 +93,7 @@ function bot_google_irc_msg_query($data) {
  * Search Google using the API.
  */
 function bot_google_search($keywords) {
-  $query = drupal_query_string_encode(array('v' => '1.0', 'q' => $keywords));
+  $query = drupal_http_build_query(array('v' => '1.0', 'q' => $keywords));
   $google = "http://ajax.googleapis.com/ajax/services/search/web?$query";
   $result = drupal_http_request($google);
   $response = json_decode($result->data);
